Forráskód Böngészése

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min 1 éve
szülő
commit
3f46b789b1

+ 14 - 3
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/product/list.vue

@@ -160,7 +160,7 @@
 
         <!--新增界面-->
         <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false"
-            customClass="customWidth" width="960px" :top="'6vh'">
+            customClass="customWidth" width="1100px" :top="'6vh'">
 
             <el-steps :active="prodEditActive" finish-status="success">
                 <el-step title="产品信息">
@@ -249,8 +249,9 @@
                             </el-select>
                         </template>
                     </el-table-column>
-                    <el-table-column label="操作" width="100" fixed="right">
+                    <el-table-column label="操作" width="200" fixed="right">
                         <template slot-scope="scope">
+                            <el-button size="mini" @click="newAddProcedure(scope.$index)">添加一行</el-button>
                             <el-button size="mini" @click="deleteProcedure(scope.$index, scope.row)">删除</el-button>
                         </template>
                     </el-table-column>
@@ -1256,6 +1257,9 @@ export default {
             if(flag){
 
                  this.addLoading = true;
+                this.procedureLit.forEach((item, index) => {
+                    item.seq = +index + 1
+                })
                 let procedureString = JSON.stringify(this.procedureLit);
                 this.http.post('/prod-procedure/changeProdProcedure', {
                     productId: this.productId,
@@ -1352,9 +1356,16 @@ export default {
                 unitPrice: '',
                 workingTime: '',
                 checkType: 0
-
             }]
         },
+        newAddProcedure(index) {
+            this.procedureLit.splice(index+1, 0, {
+                name: '',
+                unitPrice: '',
+                workingTime: '',
+                checkType: 0
+            })
+        },
         // 向表格中添加数据
         addMaterial() {
             this.prodMaterialList = [...this.prodMaterialList, {