|
|
|
@ -80,7 +80,15 @@
|
|
|
|
<u-input disabled :value="$moment(new Date()).format('YYYY-MM-DD')" placeholder="盘点时间">
|
|
|
|
<u-input disabled :value="$moment(new Date()).format('YYYY-MM-DD')" placeholder="盘点时间">
|
|
|
|
</u-input>
|
|
|
|
</u-input>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label="资产状态">
|
|
|
|
<u-form-item label="存放位置" required>
|
|
|
|
|
|
|
|
<u-input v-model="fund.position" placeholder="请输入存放位置">
|
|
|
|
|
|
|
|
</u-input>
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
<u-form-item label="保管人" required>
|
|
|
|
|
|
|
|
<u-input v-model="fund.worker_name" placeholder="请输入保管人">
|
|
|
|
|
|
|
|
</u-input>
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
<u-form-item label="资产状态" required>
|
|
|
|
<u-input :value="activeStatusFormat(fund.assets_status)" type="select"
|
|
|
|
<u-input :value="activeStatusFormat(fund.assets_status)" type="select"
|
|
|
|
@click="isShowSelect = true" placeholder="请选择资产状态"></u-input>
|
|
|
|
@click="isShowSelect = true" placeholder="请选择资产状态"></u-input>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
@ -174,6 +182,17 @@
|
|
|
|
photo: '',
|
|
|
|
photo: '',
|
|
|
|
content: ''
|
|
|
|
content: ''
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
position: [
|
|
|
|
|
|
|
|
{ required:true,message:"请输入存放位置" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
worker_name: [
|
|
|
|
|
|
|
|
{ required:true,message:"请输入保管人" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
assets_status: [
|
|
|
|
|
|
|
|
{ required:true,message:"请选择资产状态" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
qrIdList: [],
|
|
|
|
qrIdList: [],
|
|
|
|
info: [],
|
|
|
|
info: [],
|
|
|
|
@ -202,13 +221,8 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
async confirm() {
|
|
|
|
async confirm() {
|
|
|
|
|
|
|
|
if(!this.fund.position || !this.fund.worker_name || !this.fund.assets_status) {
|
|
|
|
if (!this.fund.assets_status) {
|
|
|
|
androidModule.showToast("请填写完整信息")
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: "请选择资产状态"
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (this.$refs.uUpload.lists[0]?.url) {
|
|
|
|
if (this.$refs.uUpload.lists[0]?.url) {
|
|
|
|
@ -219,7 +233,7 @@
|
|
|
|
this.fund.photo = filePath[1]?.savedFilePath
|
|
|
|
this.fund.photo = filePath[1]?.savedFilePath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await executeSql(`
|
|
|
|
await executeSql(`
|
|
|
|
update property set assets_status = "${this.fund.assets_status}",content = "${this.fund.content}",is_check = 1${this.fund.photo ? ',photo = "' + this.fund.photo + '"' : '' } where assets_id = ${this.fund.assets_id};
|
|
|
|
update property set position = "${this.fund.position}",worker_name = "${this.fund.worker_name}",assets_status = "${this.fund.assets_status}",content = "${this.fund.content}",is_check = 1${this.fund.photo ? ',photo = "' + this.fund.photo + '"' : '' } where assets_id = ${this.fund.assets_id};
|
|
|
|
`)
|
|
|
|
`)
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'success',
|
|
|
|
icon: 'success',
|
|
|
|
@ -310,6 +324,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
androidModule.tagInventoryRealTime(async res => {
|
|
|
|
androidModule.tagInventoryRealTime(async res => {
|
|
|
|
let dataList = JSON.parse(res)
|
|
|
|
let dataList = JSON.parse(res)
|
|
|
|
|
|
|
|
|
|
|
|
const getSqlIn = () => {
|
|
|
|
const getSqlIn = () => {
|
|
|
|
return Array.from(new Set([...dataList, ...this.qrIdList])).map(item => {
|
|
|
|
return Array.from(new Set([...dataList, ...this.qrIdList])).map(item => {
|
|
|
|
return `"${item.replace(/^1(0+)/g,"")}"`
|
|
|
|
return `"${item.replace(/^1(0+)/g,"")}"`
|
|
|
|
@ -319,7 +334,7 @@
|
|
|
|
let propertys = await selectFromTable(`
|
|
|
|
let propertys = await selectFromTable(`
|
|
|
|
select * from property where assets_id in (${getSqlIn()});
|
|
|
|
select * from property where assets_id in (${getSqlIn()});
|
|
|
|
`)
|
|
|
|
`)
|
|
|
|
androidModule.showToast(`扫描到:${propertys.length}件资产`)
|
|
|
|
androidModule.showToast(`扫描到:${propertys.length}件资产,扫描到编号:${Array.from(new Set([...dataList, ...this.qrIdList])).toString()}`)
|
|
|
|
this.info = propertys
|
|
|
|
this.info = propertys
|
|
|
|
this.fund = propertys[0]
|
|
|
|
this.fund = propertys[0]
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
|