材料站优化

This commit is contained in:
bb_pan 2025-09-02 16:40:41 +08:00
parent c1da903faf
commit ede571d436
1 changed files with 15 additions and 11 deletions

View File

@ -154,10 +154,10 @@
</uni-table>
<button v-if="opts.isOut" style="width: 100%; margin: 50px 0" type="primary" @click="submit(1)">
</button>
<button v-else style="width: 100%; margin: 50px 0" type="primary" @click="submit(0)">
</button>
</div>
@ -262,6 +262,7 @@ const getDetailsById = async () => {
Object.assign(formData, res.data.leaseApplyInfo)
formData.projectId = res.data.leaseApplyInfo.proId
formData.proId = res.data.leaseApplyInfo.proId
formData.relPhone = res.data.leaseApplyInfo.phone || res.data.leaseApplyInfo.relPhone || ''
getAgreementInfoById()
} catch (error) {
console.log('🚀 ~ getDetailsById ~ error:', error)
@ -527,6 +528,7 @@ const submit = (isOut) => {
.validate()
.then(async (valid) => {
formData.isOut = isOut
formData.phone = formData.relPhone
formData.createBy = uni.getStorageSync('username') || ''
console.log('🚀 ~ form.value.validate.then ~ valid:', valid)
if (tableData.value.length === 0) {
@ -561,15 +563,17 @@ const submit = (isOut) => {
leaseApplyInfo: formData,
}
console.log('🚀 ~ .then ~ params:', params)
//
const res = await uni.showModal({
title: '提示',
content: '是否确认提交?',
confirmText: isOut == 0 ? '暂存' : '出库',
cancelText: '取消',
})
console.log('🚀 ~ .then ~ res:', res)
if (!res.confirm) return
if (isOut != 0) {
//
const resp = await uni.showModal({
title: '提示',
content: '是否确认提交?',
confirmText: '提交',
cancelText: '取消',
})
console.log('🚀 ~ .confirm ~ resp:', resp)
if (!resp.confirm) return
}
uni.showLoading({
title: '提交中...',
mask: true, //