whj 11 months ago
parent
commit
5cc5b86efc

+ 14 - 0
src/views/purchase/purchase-order-page/modules/BaseForm.vue

@@ -258,6 +258,9 @@
         <template slot="cdefine22" slot-scope="text, record">
           <a-input v-model="record.cdefine22" />
         </template>
+        <template slot="cdefine33" slot-scope="text, record">
+          <a-input v-model="record.cdefine33" />
+        </template>
         <span slot="action" slot-scope="record">
           <template>
             <a-popconfirm title="是否要删除该条数据?" @confirm="handleDelOne(record)">
@@ -349,6 +352,12 @@ export default {
           width: 150,
           scopedSlots: { customRender: 'cdefine28' }
         },
+        {
+          title: '降本项目',
+          dataIndex: 'cdefine33',
+          width: 150,
+          scopedSlots: { customRender: 'cdefine33' }
+        },
         {
           title: '物资描述',
           dataIndex: 'cbmemo',
@@ -526,12 +535,17 @@ export default {
             status++
             this.$message.error('请填写' + item.spareName + '单价')
           }
+          if (!item.cdefine33) {
+            status++
+            this.$message.error('请填写' + item.spareName + '降本项目')
+          }
           item.funitprice = (+item.funitprice).toFixed(4)
           item.ipertaxrate = (+item.ipertaxrate).toFixed(2)
           item.fmoney = (+item.fmoney).toFixed(2)
           return item
         })
         if (status !== 0) {
+          this.confirmLoading = false
           return
         }
         if (values.id) {

+ 5 - 0
src/views/purchase/purchase-order-page/modules/Detail.vue

@@ -115,6 +115,11 @@ export default {
           dataIndex: 'cdefine22',
           width: 100
         },
+        {
+          title: '降本项目',
+          dataIndex: 'cdefine33',
+          width: 100
+        },
         {
           title: '申请数量',
           dataIndex: 'num',

+ 21 - 1
src/views/store/outstoreform/modules/BaseFormYY.vue

@@ -235,6 +235,9 @@
           <a-input v-model="record.remark" />
         </div>
       </template>
+      <template slot="cdefine33" slot-scope="text, record">
+        <a-input v-model="record.cdefine33" />
+      </template>
       <span slot="action" slot-scope="record">
         <template>
           <a @click="handleBaseFormForModifySelect(record)">修改</a>
@@ -359,6 +362,11 @@ export default {
           title: '货架号',
           dataIndex: 'storePosition'
         },
+        {
+          title: '降本项目',
+          dataIndex: 'cdefine33',
+          scopedSlots: { customRender: 'cdefine33' }
+        },
         /* {
           title: '备注',
           dataIndex: 'remark',
@@ -467,6 +475,7 @@ export default {
           'feeFrom',
           'pickNo',
           'type',
+          'deptId',
           'remark'
         ])))
       })
@@ -492,8 +501,15 @@ export default {
           this.confirmLoading = false
           return
         }
+        let status = 0
         values.outFlag = this.outFlag
-        values.detailList = this.data
+        values.detailList = this.data.map(item => {
+          if (!item.cdefine33) {
+            status++
+            this.$message.error('请填写' + item.spareName + '降本项目')
+          }
+          return item
+        })
         console.log(values)
         if (this.model != null) {
           values.pickId = this.model.id
@@ -501,6 +517,10 @@ export default {
         values.oldOrNew = this.tokenType
         values.userTime = BaseTool.Date.formatter(values.userTime, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
         // 日期处理
+        if (status !== 0) {
+          this.confirmLoading = false
+          return
+        }
         if (this.BaseTool.String.isBlank(values.id)) {
           addOutStoreFormYY(values)
             .then(() => {

+ 5 - 0
src/views/store/outstoreform/modules/DetailYY.vue

@@ -121,6 +121,11 @@ export default {
           title: '批次',
           dataIndex: 'cbatch'
         },
+        {
+          title: '降本项目',
+          dataIndex: 'cdefine33',
+          width: 100
+        },
         {
           title: '申请数量',
           dataIndex: 'num',