浏览代码

手工匹配订单-增加复制功能

jbb 2 年之前
父节点
当前提交
246cafde2e
共有 1 个文件被更改,包括 19 次插入2 次删除
  1. 19 2
      src/views/order/manualModal.vue

+ 19 - 2
src/views/order/manualModal.vue

@@ -58,10 +58,14 @@
                 :pagination="pagination"
                 :pagination="pagination"
                  @change="handleTableChange"
                  @change="handleTableChange"
               >
               >
+              <span slot="quantitySlot" slot-scope="text, record,index">
+                <a-input placeholder="请输入数量" v-model="record.quantity"></a-input>
+              </span>
               <span slot="operationSlot" slot-scope="text, record,index">
               <span slot="operationSlot" slot-scope="text, record,index">
                      <a @click="handleExportXls(record)" style="color:green;">关联委外</a>
                      <a @click="handleExportXls(record)" style="color:green;">关联委外</a>
-                     <!-- <a-divider type="vertical" />
-                     <a @click="handleDelete(record,index)" style="color:red;">删行</a> -->
+                     <a-divider type="vertical" />
+                     <a @click="handleCopy(record,index)" style="color:green;">复制</a>
+                     <!-- <a @click="handleDelete(record,index)" style="color:red;">删行</a> -->
                  </span>
                  </span>
 
 
               </a-table>
               </a-table>
@@ -179,6 +183,14 @@
           className: 'replacecolor',
           className: 'replacecolor',
           ellipsis: true
           ellipsis: true
         },
         },
+        {
+          title: '数量',
+          width: 90,
+          dataIndex: 'quantity',
+          className: 'replacecolor',
+          scopedSlots: { customRender: 'quantitySlot' },
+          ellipsis: true
+        },
         {
         {
           title: '操作',
           title: '操作',
           width: 120,
           width: 120,
@@ -268,6 +280,11 @@
            this.$refs.subcontractOrderModal.fatherList = record
            this.$refs.subcontractOrderModal.fatherList = record
            this.$refs.subcontractOrderModal.manualData.push(record)
            this.$refs.subcontractOrderModal.manualData.push(record)
         },
         },
+        //复制行
+        handleCopy(record,index){
+          var newObj = {...record}
+          this.manualData.splice(index,0,newObj)
+        },
         //删行
         //删行
         handleDelete(record,index){
         handleDelete(record,index){
           this.manualData.splice(index, 1);
           this.manualData.splice(index, 1);