Jelajahi Sumber

1、同步仓库功能
2、调整任务单列表显示

liqianyi 1 tahun lalu
induk
melakukan
27f18887a5

+ 17 - 9
src/views/modules/production/scheduling.vue

@@ -26,14 +26,6 @@
           :show-tooltip-when-overflow="true"
           label="任务单编码">
         </el-table-column>
-        <el-table-column
-          prop="productNumber"
-          header-align="center"
-          align="center"
-          min-width="120"
-          :show-tooltip-when-overflow="true"
-          label="生产编号">
-        </el-table-column>
         <el-table-column
           prop="productName"
           header-align="center"
@@ -58,6 +50,22 @@
           :show-tooltip-when-overflow="true"
           label="材料">
         </el-table-column>
+        <el-table-column
+          prop="productNumber"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="生产编号">
+        </el-table-column>
+        <el-table-column
+          prop="mapNumber"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="图号">
+        </el-table-column>
         <el-table-column
           header-align="center"
           align="center"
@@ -154,7 +162,7 @@
           fixed="right"
           header-align="center"
           align="center"
-          width="200"
+          width="150"
           label="操作">
           <template slot-scope="scope">
             <el-button v-if="isAuth('prod:production:updateCheck') && Number(scope.row.prodState) === 0" type="text" size="small" @click="check(scope.row)">核料</el-button>

+ 29 - 1
src/views/modules/tech/product-management.vue

@@ -282,9 +282,10 @@
           fixed="right"
           header-align="center"
           align="center"
-          width="280"
+          width="170"
           label="操作">
           <template slot-scope="scope">
+            <el-button v-if="isAuth('pro:product:synchronization')" type="text" size="small" @click="syncHandle(scope.row.productId)">同步仓库</el-button>
             <el-button v-if="isAuth('pro:product:info')" type="text" size="small" @click="detailHandle(scope.row.productId)">查看</el-button>
             <el-button v-if="isAuth('pro:product:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.productId, false)">编辑</el-button>
             <el-button v-if="isAuth('pro:product:change')" type="text" size="small" @click="changeHandle(scope.row.productId)">变更</el-button>
@@ -699,6 +700,33 @@ export default {
           })
         }).catch(() => {})
       },
+      syncHandle (id) {
+        if (!id) return
+        this.$confirm(`确定同步仓库?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/product/synchronization`),
+            method: 'POST',
+            data: {id: id}
+          }).then(({data}) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.getDataList()
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }).catch(() => {})
+      },
       importFromExcel () {
         this.importVisible = true
       },