Bladeren bron

fix: 政策批量修改

zh 2 jaren geleden
bovenliggende
commit
f3c002e8b5
1 gewijzigde bestanden met toevoegingen van 46 en 12 verwijderingen
  1. 46 12
      src/views/sales_policy/components/replaceRecordForm.vue

+ 46 - 12
src/views/sales_policy/components/replaceRecordForm.vue

@@ -50,7 +50,9 @@ export default {
         {
           name: '',
           number: '',
-          specification: ''
+          specification: '',
+          price: '',
+          createBy: ''
         }
       ],
       k3List: [],
@@ -139,8 +141,16 @@ export default {
         },
         {
           columnAttributes: {
-            label: '单价',
-            prop: 'title'
+            label: '制单人',
+            prop: 'createBy'
+          },
+          render: (h, { column, row, index }) => {
+            return (
+              <div style='margin:0 10px'>
+                <el-input value={row.createBy}
+                  onInput={e => (row.createBy = e)} placeholder='请输入制单人' size='mini' clearable ></el-input>
+              </div>
+            )
           }
         },
         {
@@ -174,6 +184,7 @@ export default {
     },
     policyColumns() {
       return [
+      
         {
           columnAttributes: {
             label: '政策编码',
@@ -201,6 +212,31 @@ export default {
         },
         {
           columnAttributes: {
+            label: '状态',
+            prop: 'status'
+          },
+          render: (h, { column, row, index }) => {
+            return (
+              <div>
+                {row.status ? '有效' : '无效'}
+              </div>
+            )
+          }
+        },
+        {
+          columnAttributes: {
+            label: '生效日期',
+            prop: 'startTime'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '失效日期',
+            prop: 'endTime'
+          }
+        },
+        {
+          columnAttributes: {
             label: '操作',
             prop: ''
           },
@@ -286,12 +322,6 @@ export default {
         },
         {
           columnAttributes: {
-            label: '单价',
-            prop: 'title'
-          }
-        },
-        {
-          columnAttributes: {
             label: '操作',
             prop: ''
           },
@@ -364,17 +394,21 @@ export default {
     },
     handleQuery() {
       const number = this.oldData[0].number
-      if (!number) {
+      const createBy = this.oldData[0].createBy
+
+      if (!number && !createBy) {
         this.$errorMsg('旧机型内容不能为空')
         return
       }
       this.selectedData = []
-      const specification = this.findData(number, 'old').specification
+      const specification = number && this.findData(number, 'old').specification
+
       getList({
         pageNum: 1,
         pageSize: -1,
         specification: specification,
-        status: 1
+        status: 1,
+        createBy
       }).then(res => {
         this.policyList = res.data.records
       })