snow 2 years ago
parent
commit
394a9ff5eb

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


+ 6 - 4
src/views/sellOut/sellAfterApply/components/set-work-order.vue

@@ -8,7 +8,7 @@
         <el-table-column label="发货仓库名称" prop="wsm_name" width="180px" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-popover placement="top" width="380" trigger="hover">
-              <h2>发货仓库</h2>
+              <h3>发货仓库</h3>
               <ul>
                 <li>编码 : {{ scope.row.wsm_code }}</li>
                 <li>负责人 : {{ scope.row.contactor_name }}</li>
@@ -66,9 +66,11 @@
             </template>
           </el-table-column>
         </el-form>
-        <el-table-column label="退货仓库所在供应商名称" prop="returnSupplierName" width="160px" show-overflow-tooltip />
-        <el-table-column label="退货仓库所在供应商编码" prop="returnSupplierNo" width="160px" show-overflow-tooltip />
-        <el-table-column label="退货仓库负责人" width="110px" prop="returnSupplierNameContactor" show-overflow-tooltip />
+        <el-table-column label="退货仓库" align="center">
+          <el-table-column label="所在供应商名称" prop="returnSupplierName" width="160px" show-overflow-tooltip />
+          <el-table-column label="所在供应商编码" prop="returnSupplierNo" width="160px" show-overflow-tooltip />
+          <el-table-column label="负责人" width="110px" prop="returnSupplierNameContactor" show-overflow-tooltip />
+        </el-table-column>
       </el-table>
     </el-form>
 

+ 18 - 42
src/views/sellOut/sellAfterApply/components/wait-stockman.vue

@@ -5,24 +5,15 @@
         <el-table-column prop="orderCode" label="销售订单" width="150px" show-overflow-tooltip />
         <el-table-column prop="outCode" label="发货单" width="145px" show-overflow-tooltip />
         <el-table-column prop="outChildCode" label="发货工单" width="155px" show-overflow-tooltip />
-        <el-table-column label="发货仓库所在供应商" prop="send_supplierName" width="170px" show-overflow-tooltip>
+        <el-table-column prop="send_wsm_name" label="发货仓库名称" min-width="180px" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-popover placement="top" width="350" trigger="hover">
-              <span>发货仓库所在供应商编码:</span><span>{{ scope.row.send_supplierNo }}</span>
-              <i slot="reference" class="el-icon-warning-outline" />
-            </el-popover>
-
-            <span>{{ scope.row.send_supplierName }}</span>
-          </template>
-        </el-table-column>
-        <!-- <el-table-column label="发货仓库所在供应商编码" prop="send_supplierNo" width="170px" show-overflow-tooltip /> -->
-        <el-table-column prop="send_wsm_name" label="发货仓库" width="170px" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <el-popover placement="top" width="280" trigger="hover">
+            <el-popover placement="top" width="380" trigger="hover">
               <ul>
-                <li>
-                  <span>发货仓库编码:</span><span>{{ scope.row.send_wsm_code }}</span>
-                </li>
+                <h3>发货仓库</h3>
+                <li>编码 : {{ scope.row.send_wsm_code }}</li>
+                <li>负责人 : {{ scope.row.send_contactor_name }}</li>
+                <li>所在供应商编码 : {{ scope.row.send_supplierNo }}</li>
+                <li>所在供应商名称 : {{ scope.row.send_supplierName }}</li>
               </ul>
               <i slot="reference" class="el-icon-warning-outline" />
             </el-popover>
@@ -30,34 +21,19 @@
             <span>{{ scope.row.send_wsm_name }}</span>
           </template>
         </el-table-column>
-        <!-- <el-table-column prop="send_wsm_code" label="发货仓库编码" width="170px" show-overflow-tooltip /> -->
-        <el-table-column label="发货仓库负责人" prop="send_contactor_name" width="110px" show-overflow-tooltip />
-        <el-table-column prop="return_num" label="发货物流" width="110px" show-overflow-tooltip />
-        <el-table-column prop="send_num" label="发货数量" show-overflow-tooltip />
-        <el-table-column label="退货仓库所在供应商" prop="return_supplierName" width="180px" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <el-popover placement="top" width="280" trigger="hover">
-              <ul>
-                <li>
-                  <span>退货仓库所在供应商编码:</span><span>{{ scope.row.return_supplierNo }}</span>
-                </li>
-              </ul>
-              <i slot="reference" class="el-icon-warning-outline" />
-            </el-popover>
 
-            <span>{{ scope.row.return_supplierName }}</span>
-          </template>
-        </el-table-column>
-        <!-- <el-table-column label="退货仓库所在供应商编码" prop="return_supplierNo" width="190px" show-overflow-tooltip /> -->
-        <el-table-column label="退货数量" prop="return_num" width="110px" show-overflow-tooltip />
+        <el-table-column prop="return_num" label="发货物流" width="110px" show-overflow-tooltip />
+        <el-table-column prop="send_num" label="发货数量" width="110px" show-overflow-tooltip />
 
-        <el-table-column label="退货销售仓库" prop="return_wsm_name" width="180px" show-overflow-tooltip>
+        <el-table-column label="退货销售仓库名称" prop="return_wsm_name" min-width="180px" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-popover placement="top" width="280" trigger="hover">
+            <el-popover placement="top" width="380" trigger="hover">
               <ul>
-                <li>
-                  <span>退货销售仓库编码:</span><span>{{ scope.row.return_wsm_code }}</span>
-                </li>
+                <h3>退货销售仓库</h3>
+                <li>编码 : {{ scope.row.return_wsm_code }}</li>
+                <li>负责人 : {{ scope.row.return_contactor_name }}</li>
+                <li>所在供应商编码 : {{ scope.row.return_supplierNo }}</li>
+                <li>所在供应商名称 : {{ scope.row.return_supplierName }}</li>
               </ul>
               <i slot="reference" class="el-icon-warning-outline" />
             </el-popover>
@@ -66,8 +42,8 @@
           </template>
         </el-table-column>
 
-        <!-- <el-table-column label="退货销售仓库编码" prop="return_wsm_code" width="180px" show-overflow-tooltip /> -->
-        <el-table-column label="退货销售仓库负责人" width="130px" prop="return_contactor_name" show-overflow-tooltip />
+        <el-table-column label="退货数量" prop="return_num" width="110px" show-overflow-tooltip />
+
         <el-table-column width="130px">
           <template slot="header">
             <span style="color:red;margin-right:2px">*</span>销售仓入库数量

+ 3 - 2
src/views/sellOut/sellAfterApply/detail.vue

@@ -176,11 +176,12 @@
               <supplier-confrim :sitem="sitem"  @changeStatus="handleSupplierConfirm"/>
             </el-collapse-item>
 
-            <el-collapse-item name="8" title="待设置工单" v-if="isHasPermission({status:'11', process:'11'})">
+ <!-- v-if="isHasPermission({status:'11', process:'11'})" -->
+            <el-collapse-item name="8" title="待设置工单">
               <set-work-order :sitem="sitem" @reload="() => initData()" />
             </el-collapse-item>
 
-            <el-collapse-item name="9" title="待库管收货"  v-if="isHasPermission({status:'12', process:'12'})">
+            <el-collapse-item name="9" title="待库管收货" v-if="isHasPermission({status:'12', process:'12'})" >
               <wait-stockman :sitem="sitem" @reload="() => initData()" />
             </el-collapse-item>
           </el-collapse>

+ 20 - 8
src/views/sellOut/sellReturn/components/set-work-order.vue

@@ -6,11 +6,21 @@
           <el-table-column prop="orderCode" label="销售订单" width="160px" show-overflow-tooltip />
           <el-table-column prop="outCode" label="发货单" width="160px" show-overflow-toolti />
           <el-table-column prop="outChildCode" label="发货工单" width="160px" show-overflow-tooltip />
-          <el-table-column label="发货仓库所在供应商名称" prop="supplierName" width="170px" show-overflow-tooltip />
-          <el-table-column label="发货仓库所在供应商编码" prop="supplierNo" width="170px" show-overflow-tooltip />
-          <el-table-column prop="wsm_name" label="发货仓库名称" width="160px" show-overflow-tooltip />
-          <el-table-column prop="wsm_code" label="发货仓库编码" width="170px" show-overflow-tooltip />
-          <el-table-column prop="contactor_name" label="发货仓库负责人" width="110px" show-overflow-tooltip />
+          <el-table-column label="发货仓库名称" prop="wsm_name" width="180px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-popover placement="top" width="380" trigger="hover">
+                <h2>发货仓库</h2>
+                <ul>
+                  <li>编码 : {{ scope.row.wsm_code }}</li>
+                  <li>负责人 : {{ scope.row.contactor_name }}</li>
+                  <li>所在供应商名称 : {{ scope.row.supplierName }}</li>
+                  <li>所在供应商编码 : {{ scope.row.supplierNo }}</li>
+                </ul>
+                <i slot="reference" class="el-icon-warning-outline" />
+              </el-popover>
+              <span>{{ scope.row.wsm_name }}</span>
+            </template>
+          </el-table-column>
           <el-table-column prop="num" label="发货数量" show-overflow-tooltip />
           <el-form>
             <el-table-column width="110px" show-overflow-tooltip>
@@ -56,9 +66,11 @@
               </template>
             </el-table-column>
           </el-form>
-          <el-table-column label="退货仓库所在供应商名称" prop="returnSupplierName" width="160px" show-overflow-tooltip />
-          <el-table-column label="退货仓库所在供应商编码" prop="returnSupplierNo" width="160px" show-overflow-tooltip />
-          <el-table-column label="退货仓库负责人" width="110px" prop="returnSupplierNameContactor" show-overflow-tooltip />
+          <el-table-column label="退货仓库" align="center">
+            <el-table-column label="所在供应商名称" prop="returnSupplierName" width="160px" show-overflow-tooltip />
+            <el-table-column label="所在供应商编码" prop="returnSupplierNo" width="160px" show-overflow-tooltip />
+            <el-table-column label="负责人" width="110px" prop="returnSupplierNameContactor" show-overflow-tooltip />
+          </el-table-column>
         </el-table>
       </el-form>
     </template>

+ 34 - 18
src/views/supplierSellOut/supplierSellAfterApply/components/set-work-order.vue

@@ -5,11 +5,22 @@
         <el-table-column prop="orderCode" label="销售订单" width="160px" show-overflow-tooltip />
         <el-table-column prop="outCode" label="发货单" width="160px" show-overflow-toolti />
         <el-table-column prop="outChildCode" label="发货工单" width="160px" show-overflow-tooltip />
-        <el-table-column label="发货仓库所在供应商名称" prop="supplierName" width="170px" show-overflow-tooltip />
-        <el-table-column label="发货仓库所在供应商编码" prop="supplierNo" width="170px" show-overflow-tooltip />
-        <el-table-column prop="wsm_name" label="发货仓库名称" width="160px" show-overflow-tooltip />
-        <el-table-column prop="wsm_code" label="发货仓库编码" width="170px" show-overflow-tooltip />
-        <el-table-column prop="contactor_name" label="发货仓库负责人" width="110px" show-overflow-tooltip />
+        <el-table-column label="发货仓库名称" prop="wsm_name" width="180px" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-popover placement="top" width="380" trigger="hover">
+              <h3>发货仓库</h3>
+              <ul>
+                <li>编码 : {{ scope.row.wsm_code }}</li>
+                <li>负责人 : {{ scope.row.contactor_name }}</li>
+                <li>所在供应商名称 : {{ scope.row.supplierName }}</li>
+                <li>所在供应商编码 : {{ scope.row.supplierNo }}</li>
+              </ul>
+              <i slot="reference" class="el-icon-warning-outline" />
+            </el-popover>
+            <span>{{ scope.row.wsm_name }}</span>
+          </template>
+        </el-table-column>
+
         <el-table-column prop="num" label="发货数量" show-overflow-tooltip />
         <el-form>
           <el-table-column width="110px" show-overflow-tooltip>
@@ -90,23 +101,28 @@ export default {
       })
     }
   },
-  async mounted() {
-    this.$nextTick(async() => {
-      const { data, code, message } = await asyncRequest.sendList({ outCode: this.sitem.outCode })
+  watch: {
+    sitem: {
+      async handler() {
+        if (!this.sitem || !this.sitem.outCode) {
+          return
+        }
 
-      switch (code) {
-        case 0:
-          this.list = data.list.map(item => ({ ...item, return_num: 0, return_wsm_code: '' }))
-          break
-        default:
-          this.$message.warning(message)
-          break
-      }
-    })
+        const { data, code, message } = await asyncRequest.sendList({ outCode: this.sitem.outCode })
+        switch (code) {
+          case 0:
+            this.list = data.list.map(item => ({ ...item, return_num: 0, return_wsm_code: '' }))
+            break
+          default:
+            this.$message.warning(message)
+            break
+        }
+      },
+      immediate: true
+    }
   },
   methods: {
     onStockChange({ code, supplierName, supplierNo, contactor_name } = {}, index) {
-      console.log(111, contactor_name)
       this.$set(this.list, index, {
         ...this.list[index],
         return_wsm_code: code ? [code] : '',

+ 140 - 124
src/views/supplierSellOut/supplierSellAfterApply/components/wait-stockman.vue

@@ -1,87 +1,119 @@
 <template>
   <div class="work-order__wrapper">
-    <el-table size="mini" border :data="list">
-      <el-table-column prop="orderCode" label="销售订单" width="160px" show-overflow-tooltip />
-      <el-table-column prop="outCode" label="发货单" width="160px" show-overflow-tooltip />
-      <!-- <el-table-column label="发货单状态" prop="order_out_status" width="150px" show-overflow-tooltip /> -->
-      <el-table-column prop="outChildCode" label="发货工单" width="160px" show-overflow-tooltip />
-      <el-table-column label="发货仓库所在供应商名称" prop="send_supplierName" width="170px" show-overflow-tooltip />
-      <el-table-column label="发货仓库所在供应商编码" prop="send_supplierNo" width="170px" show-overflow-tooltip />
-      <el-table-column prop="send_wsm_name" label="发货仓库名称" width="170px" show-overflow-tooltip />
-      <el-table-column prop="send_wsm_code" label="发货仓库编码" width="170px" show-overflow-tooltip />
-      <el-table-column prop="send_contactor_name" label="发货仓库负责人" width="110px" show-overflow-tooltip />
-      <el-table-column prop="return_num" label="发货物流" width="110px" show-overflow-tooltip />
-      <el-table-column label="发货物流单号" width="110px" show-overflow-tooltip />
-      <el-table-column prop="send_num" label="发货数量" show-overflow-tooltip />
-      <el-table-column label="退货仓库所在供应商名称" prop="return_supplierName" width="180px" show-overflow-tooltip />
-      <el-table-column label="退货仓库所在供应商编码" prop="return_supplierNo" width="190px" show-overflow-tooltip />
-      <el-table-column label="退货数量" prop="return_num" width="110px" show-overflow-tooltip />
-      <el-table-column label="退货销售仓库名称" prop="return_wsm_name" width="180px" show-overflow-tooltip />
-      <el-table-column label="退货销售仓库编码" prop="return_wsm_code" width="180px" show-overflow-tooltip />
-      <el-table-column label="退货销售仓库负责人" width="130px" prop="return_contactor_name" show-overflow-tooltip />
-      <el-table-column width="130px">
-        <template slot="header">
-          <span style="color:red;margin-right:2px">*</span>销售仓入库数量
-        </template>
-        <template slot-scope="scope">
-          <digital-input
-            :values="list[scope.$index].can_sell_num"
-            :placeholder="'销售仓入库数量'"
-            :min="0"
-            :disabled="false"
-            :max="100000000000"
-            :position="'right'"
-            :precision="0"
-            :size="'mini'"
-            :controls="false"
-            :append="''"
-            @reschange="onNumberChange($event, scope.$index,'can_sell_num')"
-          />
-        </template>
-      </el-table-column>
+    <el-form>
+      <el-table size="mini" border :data="list">
+        <el-table-column prop="orderCode" label="销售订单" width="150px" show-overflow-tooltip />
+        <el-table-column prop="outCode" label="发货单" width="145px" show-overflow-tooltip />
+        <el-table-column prop="outChildCode" label="发货工单" width="155px" show-overflow-tooltip />
+        <el-table-column prop="send_wsm_name" label="发货仓库名称" min-width="180px" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-popover placement="top" width="380" trigger="hover">
+              <ul>
+                <h3>发货仓库</h3>
+                <li>编码 : {{ scope.row.send_wsm_code }}</li>
+                <li>负责人 : {{ scope.row.send_contactor_name }}</li>
+                <li>所在供应商编码 : {{ scope.row.send_supplierNo }}</li>
+                <li>所在供应商名称 : {{ scope.row.send_supplierName }}</li>
+              </ul>
+              <i slot="reference" class="el-icon-warning-outline" />
+            </el-popover>
 
-      <el-table-column width="130px">
-        <template slot="header">
-          <span style="color:red;margin-right:2px">*</span>次品仓入库数量
-        </template>
-        <template slot-scope="scope">
-          <digital-input
-            :values="list[scope.$index].defective_num"
-            :placeholder="'次品仓入库数量'"
-            :min="0"
-            :disabled="false"
-            :max="100000000000"
-            :position="'right'"
-            :precision="0"
-            :size="'mini'"
-            :controls="false"
-            :append="''"
-            @reschange="onNumberChange($event, scope.$index,'defective_num')"
-          />
-        </template>
-      </el-table-column>
+            <span>{{ scope.row.send_wsm_name }}</span>
+          </template>
+        </el-table-column>
 
-      <el-table-column width="130px">
-        <template slot="header">
-          <span style="color:red;margin-right:2px">*</span>丢失数量
-        </template>
-        <template slot-scope="scope">
-          <digital-input
-            :values="list[scope.$index].loss_num"
-            :placeholder="'loss_num'"
-            :min="0"
-            :disabled="false"
-            :max="100000000000"
-            :position="'right'"
-            :precision="0"
-            :size="'mini'"
-            :controls="false"
-            :append="''"
-            @reschange="onNumberChange($event, scope.$index,'loss_num')"
-          />
-        </template>
-      </el-table-column>
-    </el-table>
+        <el-table-column prop="return_num" label="发货物流" width="110px" show-overflow-tooltip />
+        <el-table-column prop="send_num" label="发货数量" width="110px" show-overflow-tooltip />
+
+        <el-table-column label="退货销售仓库名称" prop="return_wsm_name" min-width="180px" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-popover placement="top" width="380" trigger="hover">
+              <ul>
+                <h3>退货销售仓库</h3>
+                <li>编码 : {{ scope.row.return_wsm_code }}</li>
+                <li>负责人 : {{ scope.row.return_contactor_name }}</li>
+                <li>所在供应商编码 : {{ scope.row.return_supplierNo }}</li>
+                <li>所在供应商名称 : {{ scope.row.return_supplierName }}</li>
+              </ul>
+              <i slot="reference" class="el-icon-warning-outline" />
+            </el-popover>
+
+            <span>{{ scope.row.return_wsm_name }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="退货数量" prop="return_num" width="110px" show-overflow-tooltip />
+
+        <el-table-column width="130px">
+          <template slot="header">
+            <span style="color:red;margin-right:2px">*</span>销售仓入库数量
+          </template>
+          <template slot-scope="scope">
+            <el-form-item>
+              <digital-input
+                :values="list[scope.$index].can_sell_num"
+                :placeholder="'销售仓入库数量'"
+                :min="0"
+                :disabled="false"
+                :max="100000000000"
+                :position="'right'"
+                :precision="0"
+                :size="'mini'"
+                :controls="false"
+                :append="''"
+                @reschange="onNumberChange($event, scope.$index,'can_sell_num')"
+              />
+            </el-form-item>
+          </template>
+        </el-table-column>
+
+        <el-table-column width="130px">
+          <template slot="header">
+            <span style="color:red;margin-right:2px">*</span>次品仓入库数量
+          </template>
+          <template slot-scope="scope">
+            <el-form-item>
+              <digital-input
+                :values="list[scope.$index].defective_num"
+                :placeholder="'次品仓入库数量'"
+                :min="0"
+                :disabled="false"
+                :max="100000000000"
+                :position="'right'"
+                :precision="0"
+                :size="'mini'"
+                :controls="false"
+                :append="''"
+                @reschange="onNumberChange($event, scope.$index,'defective_num')"
+              />
+            </el-form-item>
+          </template>
+        </el-table-column>
+
+        <el-table-column width="130px">
+          <template slot="header">
+            <span style="color:red;margin-right:2px">*</span>丢失数量
+          </template>
+          <template slot-scope="scope">
+            <el-form-item>
+              <digital-input
+                :values="list[scope.$index].loss_num"
+                :placeholder="'loss_num'"
+                :min="0"
+                :disabled="false"
+                :max="100000000000"
+                :position="'right'"
+                :precision="0"
+                :size="'mini'"
+                :controls="false"
+                :append="''"
+                @reschange="onNumberChange($event, scope.$index,'loss_num')"
+              />
+            </el-form-item>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-form>
     <el-button class="fr" style="margin:10px 0px" size="mini" type="primary" @click="onSetOrderReturnChild">保存</el-button>
   </div>
 </template>
@@ -97,19 +129,25 @@ export default {
     loading: false,
     list: []
   }),
-  mounted() {
-    this.$nextTick(async() => {
-      const { data, code, message } = await asyncRequest.afterChild({ returnCode: this.sitem.returnCode })
-      console.log(data)
-      switch (code) {
-        case 0:
-          this.list = data.list
-          break
-        default:
-          this.$message.warning(message)
-          break
-      }
-    })
+  watch: {
+    sitem: {
+      async handler() {
+        if (!this.sitem || !this.sitem.outCode) {
+          return
+        }
+
+        const { data, code, message } = await asyncRequest.afterChild({ returnCode: this.sitem.returnCode })
+        switch (code) {
+          case 0:
+            this.list = data.list.map(item => ({ ...item, can_sell_num: 0, defective_num: 0, loss_num: 0 }))
+            break
+          default:
+            this.$message.warning(message)
+            break
+        }
+      },
+      immediate: true
+    }
   },
   methods: {
     onNumberChange(num, index, prop) {
@@ -119,23 +157,9 @@ export default {
       })
     },
     async onSetOrderReturnChild() {
-      const canErrors = []
-      const defErrors = []
-      const lossErrors = []
-
-      const list = this.list.map(({ id, can_sell_num, defective_num, loss_num }, index) => {
-        if (!can_sell_num) {
-          canErrors.push(index)
-        }
-
-        if (!defective_num) {
-          defErrors.push(index)
-        }
-
-        if (!loss_num) {
-          lossErrors.push(index)
-        }
-
+      let total = 0
+      const list = this.list.map(({ id, can_sell_num, defective_num, loss_num }) => {
+        total += (can_sell_num + defective_num + loss_num)
         return ({
           id,
           loss_num,
@@ -144,24 +168,16 @@ export default {
         })
       })
 
-      // if (canErrors.length !== 0) {
-      //   this.$message.warning('第' + canErrors.map(row => row + 1).join(',') + '行,销售仓入库数量不能为空!')
-      //   return
-      // }
-
-      // if (defErrors.length !== 0) {
-      //   this.$message.warning('第' + defErrors.map(row => row + 1).join(',') + '行,次品仓入库数量不能为空!')
-      //   return
-      // }
-
-      // if (lossErrors.length !== 0) {
-      //   this.$message.warning('第' + lossErrors.map(row => row + 1).join(',') + '行,丢失数量不能为空!')
-      //   return
-      // }
+      if (Number(this.sitem.out_num) !== total) {
+        this.$message.warning('销售仓入库数量、次品仓入库数量、丢失数量相加必须等于发货数量')
+        return
+      }
 
       this.subLoading = true
       const { code, message } = await asyncRequest.deliveryOrderReturnChild({ list, returnCode: this.sitem.returnCode })
+
       this.subLoading = false
+
       switch (code) {
         case 0:
           this.$emit('reload')

Some files were not shown because too many files changed in this diff