master
xy 3 years ago
parent eb0ce8af42
commit feef84fd23

@ -74,7 +74,7 @@
<view style="padding: 20rpx 40rpx;"> <view style="padding: 20rpx 40rpx;">
<u-form :model="fund" ref="form" label-position="top"> <u-form :model="fund" ref="form" label-position="top">
<u-form-item label="名称"> <u-form-item label="名称">
<u-input disabled v-model="fund.name" placeholder="资产名称"></u-input> <u-input v-model="fund.name" placeholder="资产名称"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="盘点时间"> <u-form-item label="盘点时间">
<u-input disabled :value="$moment(new Date()).format('YYYY-MM-DD')" placeholder="盘点时间"> <u-input disabled :value="$moment(new Date()).format('YYYY-MM-DD')" placeholder="盘点时间">
@ -240,7 +240,7 @@
}, },
async confirm() { async confirm() {
if (!this.fund.position || !this.fund.assets_status) { if (!this.fund.position || !this.fund.assets_status || !this.fund.name) {
androidModule.showToast("请填写完整信息") androidModule.showToast("请填写完整信息")
} }
try { try {
@ -252,7 +252,7 @@
this.fund.photo = filePath[1]?.savedFilePath this.fund.photo = filePath[1]?.savedFilePath
} }
await executeSql(` await executeSql(`
update property set position = "${this.fund.position}",worker_id = ${this.fund.worker_id},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 name = "${this.fund.name}",position = "${this.fund.position}",worker_id = ${this.fund.worker_id},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',

@ -92,7 +92,7 @@
} }
try { try {
let res = await selectFromTable(` let res = await selectFromTable(`
select assets_id,position,assets_status,photo,content,worker_id from property where is_check = 1; select assets_id,position,assets_status,photo,content,worker_id,name from property where is_check = 1;
`) `)
if (res.length === 0) { if (res.length === 0) {

Loading…
Cancel
Save