材料站优化

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