Преглед изворни кода

Merge branch 'company' of http://120.46.155.214:3000/xiaodai2022/order-ui-pc into company

xiaodai2022 пре 1 година
родитељ
комит
0d8449433a

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/0.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/chunk-elementUI.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/chunk-libs.js


+ 3 - 2
src/views/goodStore/goodsCost/index.vue

@@ -321,11 +321,12 @@
         <!-- scope.row.has_account + '' == '0' && -->
         <el-tooltip
           v-if="
-            (((ppowers.some((i) => i == '7') && scope.row.status + '' === '7') ||
+            ((((ppowers.some((i) => i == '7') && scope.row.status + '' === '7') ||
               (ppowers.some((i) => i == '6') && scope.row.status + '' === '6') ||
               (ppowers.some((i) => i == '8') && scope.row.status + '' === '8')) &&
             (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
-            !isSupertube && String(scope.row.has_account) === '0'
+            !isSupertube && String(scope.row.has_account) === '0')
+             && String(scope.row.createrid) !== '0'
           "
           effect="dark"
           content="修改"

+ 3 - 2
src/views/purchaseIn/deliveryWorkOrder/detail.vue

@@ -99,8 +99,9 @@
               />
             </el-collapse-item>
 
-            <el-collapse-item title="待库管发货" name="2"  v-if="canSend && sitem.status === '1' && !isSupertube && ppowers.includes('1')">
-              <express-node @refresh="() => initData()" :sitem="sitem" />
+            <el-collapse-item title="待库管发货" name="2"  v-if="sitem.status === '1' && !isSupertube && ppowers.includes('1')">
+              <express-node v-if="canSend" @refresh="() => initData()" :sitem="sitem" />
+              <el-alert v-else type="warning" :title="'当前节点只能由仓库管理员 ' + sitem.contactor_name + ' 操作'" :closable="false" show-icon />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>

+ 4 - 3
src/views/purchaseIn/wsmInOrder/detail.vue

@@ -87,16 +87,18 @@
             <el-collapse-item
               title="入库验收"
               name="3"
-              v-if="canInStock && status == '1' && ppowers.some((i) => i == '1') && !isSupertube"
+              v-if="status == '1' && ppowers.some((i) => i == '1') && !isSupertube"
             >
               <wsm-in
-                v-if="newTime !== ''"
+                v-if="newTime !== '' && canInStock"
                 :id="queryId"
                 :newTime="newTime"
                 :modelSitem="{}"
                 :sitem="sitem"
                 @refresh="initData()"
               />
+
+              <el-alert v-else type="warning" :title="'当前节点只能由仓库管理员 ' + sitem.contactor_name + ' 操作'" :closable="false" show-icon />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
@@ -164,7 +166,6 @@ export default {
       sitem: null,
       status: "",
       statusOptions,
-
       newTime: "",
       loading: false,
       queryId: ""

+ 3 - 3
src/views/sellOut/deliveryWorkOrder/detail.vue

@@ -100,13 +100,13 @@
               />
             </el-collapse-item>
 
-            <!-- canSend -->
             <el-collapse-item
               title="待库管发货"
               name="2"
-              v-if="canSend && sitem.status === '1' && !isSupertube && ppowers.includes('1')"
+              v-if="sitem && sitem.status === '1' && !isSupertube && ppowers.includes('1')"
             >
-              <express-node @refresh="() => initData()" :sitem="sitem" />
+              <express-node v-if="canSend" @refresh="() => initData()" :sitem="sitem" />
+              <el-alert v-else type="warning" :title="'当前节点只能由仓库管理员 ' + sitem.contactor_name + ' 操作'" :closable="false" show-icon />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>

+ 89 - 17
src/views/sellOut/filing/cpns/wait-transferred.vue

@@ -1,5 +1,18 @@
 <template>
   <div>
+    <div style="display:flex;margin-bottom: 10px">
+      <p style="width:80px">
+        <span style="color:red">*</span>&nbsp;客户公司
+      </p>
+      <search-customer
+        :value="ruleForm.companyCode"
+        :names="ruleForm.companyName"
+        :placeholder="'客户公司'"
+        :size="'mini'"
+        @searchChange="customerChange"
+      />
+    </div>
+
     <el-form ref="formRef" :model="editCacheData" :rules="rules">
       <el-table border size="mini" :data="list" max-height="300px">
         <el-table-column label="收货总数" prop="receipt_quantity">
@@ -37,14 +50,24 @@
         <el-table-column label="收货省市区" prop="addr_code">
           <template slot-scope="scope">
             <el-form-item v-if="scope.$index === editIndex" prop="addr_code">
-              <select-area
+              <!-- <select-area
                 :value="editCacheData.addr_code"
                 :placeholder="'收货省市区'"
                 size="mini"
                 @selectChange="handleInAddrChange($event)"
+              />-->
+              <search-area
+                :value="editCacheData.area_code"
+                :is-detail="scope.$index === editIndex"
+                :disabled="!scope.$index === editIndex"
+                size="mini"
+                :names="[getAddrName(scope.row.addr_code_name)]"
+                placeholder="收货省市区"
+                :level="3"
+                @searchChange="areaChange($event,scope.$index)"
               />
             </el-form-item>
-            <span v-else>{{ scope.row.addr_code_name }}</span>
+            <span v-else>{{getAddrName(scope.row.addr_code_name,true)}}</span>
           </template>
         </el-table-column>
 
@@ -125,22 +148,27 @@ const defaultAddressData = {
   contactor: "",
   addr_code: "",
   mobile: "",
-  addr: ""
+  addr: "",
+  area_code: "",
+  area_label: ""
 };
 
 export default {
-  components: {
-    InAddressModal
-  },
+  components: { InAddressModal },
   props: ["id", "num"],
   data() {
     return {
+      ruleForm: {
+        companyName: "",
+        companyCode: ""
+      },
       list: [],
       editIndex: -1,
       loading: false,
       showModal: false,
       rules: addressRules,
-      editCacheData: { ...defaultAddressData }
+      editCacheData: { ...defaultAddressData },
+      companyName: ""
     };
   },
   methods: {
@@ -161,7 +189,9 @@ export default {
         mobile,
         addr_code,
         addr,
-        addr_code_name
+        addr_code_name,
+        area_code,
+        area_label
       } = this.list[index];
 
       this.editCacheData = {
@@ -170,7 +200,9 @@ export default {
         mobile,
         addr_code,
         addr,
-        addr_code_name
+        addr_code_name,
+        area_code,
+        area_label
       };
     },
 
@@ -192,14 +224,17 @@ export default {
       utils.book_append_sheet(workBook, workSheet, "sheet");
 
       // 导出模板
-      writeFile(workBook, "收货模板.xlsx", {
-        bookType: "xlsx"
-      });
+      writeFile(workBook, "收货模板.xlsx", { bookType: "xlsx" });
     },
     handleDelete(index) {
       this.list.splice(index, 1);
       if (this.editIndex >= 0) this.editIndex = -1;
     },
+    getAddrName(name, modifider) {
+      if (modifider) return name;
+      const _n = name.split("/").join("");
+      return _n;
+    },
 
     handleSave() {
       this.$refs.formRef.validate(async isValid => {
@@ -221,6 +256,15 @@ export default {
       });
     },
 
+    customerChange(evt) {
+      const { code, label } = evt;
+
+      this.ruleForm = {
+        companyCode: code ? [code] : "",
+        companyName: label ? [label] : ""
+      };
+    },
+
     handleRefresh(data) {
       const _data = data.list.map(
         ({
@@ -236,10 +280,13 @@ export default {
           contactor,
           mobile,
           receipt_quantity,
-          addr_code_name
+          addr_code_name,
+          area_code: [addr_code[addr_code.length - 1]]
         })
       );
 
+      console.log(_data);
+
       this.list = [...this.list, ..._data];
       this.showModal = false;
     },
@@ -254,11 +301,28 @@ export default {
       this.editIndex = this.list.length - 1;
     },
 
+    async areaChange(e) {
+      console.log(e);
+      const { code, area_code, splitLabel } = e;
+      this.editCacheData.area_label = splitLabel
+        ? splitLabel.split(",").join("/")
+        : "";
+
+      this.editCacheData["area_code"] = area_code ? [area_code] : [];
+
+      this.editCacheData["addr_code"] = code ? code.split(",") : [];
+    },
+
     handleInAddrChange(e) {
       this.editCacheData["addr_code"] = e;
     },
 
     async handleSubmit() {
+      if (!this.ruleForm.companyCode) {
+        this.$message.warning("请选择客户公司");
+        return;
+      }
+
       if (this.editIndex !== -1) {
         this.$message.warning("当前已有地址在编辑,请保存后再试!");
         return;
@@ -273,17 +337,25 @@ export default {
         return Number(current) + Number(prev.receipt_quantity);
       }, 0);
 
-      if (Number(this.num) > currentNum) {
-        this.$message.warning("收货数量小于销售数量!");
+      if (currentNum > Number(this.num)) {
+        this.$message.warning(
+          `未转单数量为${this.num},收货数量总和不能超过未转单数量!`
+        );
         return;
       }
 
-      const { data, code, message } = await asyncRequest.transfer({
+      const { code, message } = await asyncRequest.transfer({
         id: this.id,
-        addr_list: this.list
+        addr_list: this.list,
+
+        customerCode: Array.isArray(this.ruleForm.companyCode)
+          ? this.ruleForm.companyCode[0]
+          : this.ruleForm.companyCode
       });
 
       if (Number(code) === 0) {
+        this.list = [];
+        this.ruleForm.companyCode = "";
         this.$emit("refresh");
       } else {
         this.$message.error(message);

+ 14 - 1
src/views/sellOut/filing/detail.vue

@@ -28,6 +28,16 @@
             <compliance-form :sitem="sitem" @refresh="refresh" />
           </el-collapse-item>
 
+          <tempalte
+            v-if="(String(status) == '2' || String(status) == '3') && !isSupertube && (
+            _process.includes('2') || _process.includes('3') && Number(sitem.wsm_has_account) === 0
+          )"
+          >
+            <el-collapse-item name="3" title="待转单">
+              <wait-transferred :id="id" :num="num" @refresh="handleRefresh" />
+            </el-collapse-item>
+          </tempalte>
+
           <el-collapse-item v-if="status === '3'" name="4" title="发货单">
             <shipment-request :order-code="orderCode" />
           </el-collapse-item>
@@ -51,6 +61,7 @@
 </template>
 
 <script>
+import WaitTransferred from "./cpns/wait-transferred.vue";
 import ShipmentRequest from "./cpns/shipment-request.vue";
 import asyncRequest from "@/apis/service/sellOut/filing";
 import ComplianceForm from "./cpns/complianceForm.vue";
@@ -65,7 +76,8 @@ export default {
     ExamForms,
     baseDetail,
     ComplianceForm,
-    ShipmentRequest
+    ShipmentRequest,
+    WaitTransferred
   },
   data() {
     return {
@@ -102,6 +114,7 @@ export default {
       const { roleProcess } = this.$store.getters;
       const tran = roleProcess.find(i => i.process_type === "BBD") || {};
       const { action } = tran ?? {};
+      console.log(action)
       return action ?? [];
     }
   },

+ 4 - 4
src/views/sellOut/sellAfterApply/components/supplier-confirm.vue

@@ -6,15 +6,15 @@
       </el-select>
     </el-form-item>
     <el-form-item label="审核备注" prop="remark">
-      <el-input v-model="formData.remark" type="textarea" />
+      <el-input v-model="formData.remark" placeholder="审核备注" type="textarea" />
     </el-form-item>
 
     <template v-if="displayExpressField">
       <el-form-item label="收货人" prop="contactor">
-        <el-input v-model="formData.contactor" />
+        <el-input v-model="formData.contactor" placeholder="收货人" />
       </el-form-item>
       <el-form-item label="联系电话" prop="mobile">
-        <el-input v-model="formData.mobile" :maxlength="11" />
+        <el-input v-model="formData.mobile" :maxlength="11" placeholder="联系电话" />
       </el-form-item>
       <el-form-item label="退货地址" prop="addr_code">
         <search-area
@@ -22,7 +22,7 @@
           :is-detail="true"
           size="mini"
           :names="label"
-          placeholder="退货地址"
+          placeholder="退货地址省市区"
           :level="3"
           @searchChange="areaChange($event)"
         />

+ 1 - 1
src/views/sellOut/sellAfterApply/detail.vue

@@ -223,11 +223,11 @@
 
             <el-collapse-item
               name="7"
-              title="业务公司修改,待供应商确认"
               v-if="
                 isHasPermission({ status: '10', process: '10' }) &&
                 String(sitem.has_account) === '0'
               "
+              title="业务公司修改,待供应商确认"
             >
               <supplier-confrim :sitem="sitem" @changeStatus="handleSupplierConfirm" />
             </el-collapse-item>

+ 1 - 0
src/views/sellOut/sellAfterApply/index.vue

@@ -326,6 +326,7 @@
     </div>
   </div>
 </template>
+
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";

+ 3 - 2
src/views/supplierPurchaseIn/supplierDeliveryWorkOrder/detail.vue

@@ -103,11 +103,12 @@
             </el-collapse-item>
 
             <el-collapse-item
+              v-if="sitem && sitem.status === '1' && !isSupertube && ppowers.includes('1')"
               title="待库管发货"
               name="3"
-              v-if="canSend && sitem.status === '1' && !isSupertube && ppowers.includes('1')"
             >
-              <express-node @refresh="() => initData()" :sitem="sitem" />
+              <express-node v-if="canSend" @refresh="() => initData()" :sitem="sitem" />
+              <el-alert v-else type="warning" :title="'当前节点只能由仓库管理员 ' + sitem.contactor_name + ' 操作'" :closable="false" show-icon />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>

+ 1 - 3
src/views/supplierPurchaseIn/supplierDeliveryWorkOrder/sendOutOrder.vue

@@ -74,8 +74,6 @@ export default {
       return false;
     },
     handleSuccess({ results, header }) {
-      // alert(this.head.length, header.length)
-      // console.log(results)
       if (!this.loading) {
         this.loading = true;
         if (results.length === 0) {
@@ -84,12 +82,12 @@ export default {
           return;
         }
 
-        console.log(this.head.length,header.length);
         if (this.head.length !== header.length) {
           this.$message.error("表头与导入模板不匹配!");
           this.loading = false;
           return;
         }
+
         let hederOk = true;
         this.head.forEach((v1, i1) => {
           if (v1.replace(/\s*/g, "") !== header[i1].replace(/\s*/g, "")) {

+ 3 - 2
src/views/supplierPurchaseIn/supplierWsmInOrder/detail.vue

@@ -86,16 +86,17 @@
             <el-collapse-item
               title="入库验收"
               name="3"
-              v-if="canInStock && status == '1' && ppowers.some((i) => i == '1') && !isSupertube"
+              v-if="status == '1' && ppowers.some((i) => i == '1') && !isSupertube"
             >
               <wsm-in
-                v-if="newTime !== ''"
+                v-if="newTime !== '' && canInStock"
                 :id="queryId"
                 :newTime="newTime"
                 :modelSitem="{}"
                 :sitem="sitem"
                 @refresh="initData()"
               />
+              <el-alert v-else type="warning" :title="'当前节点只能由仓库管理员 ' + sitem.contactor_name + ' 操作'" :closable="false" show-icon />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>

+ 1 - 1
src/views/supplierSellOut/supplierFiling/detail.vue

@@ -19,7 +19,7 @@
           </template>
           <tempalte
             v-if="(status == '2' || status == '3') && !isSupertube && (
-            _process.includes('2') || _process.includes('3')
+            _process.includes('2') || _process.includes('3') && Number(sitem.wsm_has_account) !== 0
           )"
           >
             <el-collapse-item name="3" title="待转单">

+ 2 - 2
src/views/supplierSellOut/supplierFiling/index.vue

@@ -200,9 +200,9 @@
 
         <el-tooltip effect="dark" content="修改" placement="top">
           <i
-            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005')"
+            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005') &&  Number(scope.row.wsm_has_account) !== 0"
             class="el-icon-edit tb-icon"
-            @click="getRouter('/supplierSellOut/supplierFilingDetail', scope.row.id,'edit')"
+            @click="getRouter('/supplierSellOut/supplierFilingDetail', scope.row.id, 'edit')"
           />
         </el-tooltip>
 

+ 4 - 4
src/views/supplierSellOut/supplierSellAfterApply/components/supplier-confirm.vue

@@ -6,15 +6,15 @@
       </el-select>
     </el-form-item>
     <el-form-item label="审核备注" prop="remark">
-      <el-input v-model="formData.remark" type="textarea" />
+      <el-input v-model="formData.remark" type="textarea" placeholder="审核备注" />
     </el-form-item>
 
     <template v-if="displayExpressField">
       <el-form-item label="收货人" prop="contactor">
-        <el-input v-model="formData.contactor" />
+        <el-input v-model="formData.contactor" placeholder="收货人" />
       </el-form-item>
       <el-form-item label="联系电话" prop="mobile">
-        <el-input v-model="formData.mobile" :maxlength="11" />
+        <el-input v-model="formData.mobile" :maxlength="11" placeholder="联系电话" />
       </el-form-item>
       <el-form-item label="退货地址" prop="addr_code">
         <search-area
@@ -22,7 +22,7 @@
           :is-detail="true"
           size="mini"
           :names="label"
-          placeholder="退货地址"
+          placeholder="退货地址省市区"
           :level="3"
           @searchChange="areaChange($event)"
         />

Неке датотеке нису приказане због велике количине промена