材料站优化
This commit is contained in:
parent
c1da903faf
commit
ede571d436
|
|
@ -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, // 遮罩层
|
||||
|
|
|
|||
Loading…
Reference in New Issue