材料站优化
This commit is contained in:
		
							parent
							
								
									c1da903faf
								
							
						
					
					
						commit
						ede571d436
					
				| 
						 | 
					@ -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({
 | 
					        // 弹框确定
 | 
				
			||||||
        title: '提示',
 | 
					        const resp = await uni.showModal({
 | 
				
			||||||
        content: '是否确认提交?',
 | 
					          title: '提示',
 | 
				
			||||||
        confirmText: isOut == 0 ? '暂存' : '出库',
 | 
					          content: '是否确认提交?',
 | 
				
			||||||
        cancelText: '取消',
 | 
					          confirmText: '提交',
 | 
				
			||||||
      })
 | 
					          cancelText: '取消',
 | 
				
			||||||
      console.log('🚀 ~ .then ~ res:', res)
 | 
					        })
 | 
				
			||||||
      if (!res.confirm) return
 | 
					        console.log('🚀 ~ .confirm ~ resp:', resp)
 | 
				
			||||||
 | 
					        if (!resp.confirm) return
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      uni.showLoading({
 | 
					      uni.showLoading({
 | 
				
			||||||
        title: '提交中...',
 | 
					        title: '提交中...',
 | 
				
			||||||
        mask: true, // 遮罩层
 | 
					        mask: true, // 遮罩层
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue