xiaodai2022 3 jaren geleden
bovenliggende
commit
1b5d6203f9
2 gewijzigde bestanden met toevoegingen van 59 en 45 verwijderingen
  1. 52 27
      src/views/sellOut/salesOrder/components/order-out-table.vue
  2. 7 18
      src/views/sellOut/salesOrder/detail.vue

+ 52 - 27
src/views/sellOut/salesOrder/components/order-out-table.vue

@@ -20,7 +20,7 @@
         show-overflow-tooltip
         prop="send_status"
         label="状态"
-        width="80"
+        width="100"
       >
         <template slot-scope="scope">
           <el-tag
@@ -83,22 +83,17 @@
         label="发货时间"
         width="145"
       />
-      <el-table-column
-        fixed="right"
-        width="50"
-        v-if="
-          ((status === '0' || status === '1') &&
-            powers.some((item) => item == '048')) ||
-          powers.some((item) => item == '007')
-        "
-      >
+      <el-table-column fixed="right" width="100">
         <template slot="header" slot-scope="scope">
+          <span>操作</span>
           <el-tooltip
             style="margin: 3px 0 0 0"
             effect="dark"
+            class="fr"
             v-if="
               (status === '0' || status === '1') &&
-              powers.some((item) => item == '048')
+              powers.some((item) => item == '048') &&
+              sitem.send_type !== '1'
             "
             content="添加"
             placement="top"
@@ -109,7 +104,20 @@
               @click="openHouseModal()"
             ></i>
           </el-tooltip>
-          <span v-else>操作</span>
+
+          <el-tooltip
+            style="margin: 3px 0 0 0"
+            effect="dark"
+            content="退货"
+            class="fr"
+            placement="top"
+          >
+            <i
+              class="el-icon-delete tb-icon"
+              style="color: #63cbe7; magin: 0 0 0 10px"
+              @click="openModal()"
+            ></i>
+          </el-tooltip>
         </template>
 
         <template slot-scope="scope">
@@ -136,6 +144,16 @@
       @refresh="refresh"
       @closeModel="closeModel"
     />
+
+    <add-model
+      :id="returnId"
+      :sitem="returnItem"
+      :show-model="returnModel"
+      :is-detail="false"
+      @refresh="searchList"
+      @cancel="returnModel = false"
+    />
+
     <!-- <add-edit
       :id="modelId"
       :sitem="s_sitem"
@@ -151,14 +169,14 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import outOrderAddModel from "./out-order-add-model";
-
+import addModel from "@/views/sellOut/sellReturn/components/addModel";
 import { mapGetters } from "vuex";
 
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
   props: ["newTime", "id", "sitem"],
-  components: { outOrderAddModel },
+  components: { outOrderAddModel, addModel },
   watch: {
     newTime: function (val) {
       if (val) {
@@ -186,13 +204,14 @@ export default {
     return {
       orderCode: "",
       outCode: "",
+      is_all: false,
       // 状态
       statusOptions: [
-               { id: "0", label: "待发货" },
+        { id: "0", label: "待公司采购" },
         { id: "1", label: "待库管发货" },
         { id: "2", label: "待收货" },
         { id: "3", label: "已收货" },
-        { id: "4", label: "已全部退货" }
+        { id: "4", label: "已全部退货" },
       ],
       showGoodsModel: false,
       stock_code: "",
@@ -204,6 +223,9 @@ export default {
       modelId: "",
       modelItem: null,
       s_sitem: null,
+      returnId: "",
+      returnItem: null,
+      returnModel: false,
     };
   },
   mounted() {
@@ -231,7 +253,10 @@ export default {
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
-        const { addrs, status } = this.sitem;
+        const { addrs, status, wsend_num, send_type } = this.sitem;
+        console.log(send_type);
+        let wsall = wsend_num * 1;
+
         this.status = status;
         console.log(this.status);
         this.tableData = JSON.parse(JSON.stringify(addrs));
@@ -263,12 +288,6 @@ export default {
       }
     },
 
-    openHouseModal() {
-      this.modelId = "add";
-      this.modelItem = this.sitem;
-      this.modelShowModel = true;
-    },
-
     //省市区保存某一行
     checkRow(rowIndex) {
       this.$refs.addrForm.validate((valid) => {
@@ -321,10 +340,16 @@ export default {
         }
       });
     },
-    openModal(code, sitem, outcode) {
-      this.s_sitem = sitem;
-      this.modelId = code;
-      this.showModel = true;
+    openHouseModal() {
+      this.modelId = "add";
+      this.modelItem = this.sitem;
+      this.modelShowModel = true;
+    },
+    openModal() {
+      this.returnId = "add";
+      this.returnItem = this.sitem;
+      this.returnModel = false;
+      console.log(addModel);
     },
   },
 };

+ 7 - 18
src/views/sellOut/salesOrder/detail.vue

@@ -7,14 +7,14 @@
       <div style="height: 30px">
         <span>订单编号:</span><span v-if="sitem">{{ sitem.orderCode }}</span>
         <!-- v-if="status === '4' && powers.some((item) => item == '051')" -->
-        <el-button
+        <!-- <el-button
           style="margin: 0 0 0 10px"
           class="fr"
           type="primary"
           :size="'mini'"
           @click="openModal()"
           >新建销售退货单
-        </el-button>
+        </el-button> -->
         <el-button
           style="margin: 0 0 0 10px"
           class="fr"
@@ -143,14 +143,7 @@
           />
         </el-tab-pane>
       </el-tabs>
-      <add-model
-        :id="modelId"
-        :sitem="s_sitem"
-        :show-model="showModel"
-        :is-detail="isDetail"
-        @refresh="searchList"
-        @cancel="showModel = false"
-      />
+   
       <!-- <edit-add
         :id="modelId"
         :sitem="sitem"
@@ -177,14 +170,14 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import addForm from "./components/addForm";
 import orderOutTable from "./components/order-out-table";
-import addModel from "@/views/sellOut/sellReturn/components/addModel";
+
 import { showColumns } from "./components/ShowDataTableColumns";
 import setPartial from "./setPartial";
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
-    addModel,
+
     addForm,
     orderOutTable,
     setPartial,
@@ -222,7 +215,7 @@ export default {
         { value: "3", label: "订单已取消" },
       ],
       sitem: null,
-      s_sitem: null,
+   
       orderCode: "",
       status: "",
       newTime: "",
@@ -325,11 +318,7 @@ export default {
       }
       this.loading = false;
     },
-    openModal() {
-      this.modelId = "add";
-      this.s_sitem = this.sitem;
-      this.showModel = true;
-    },
+ 
   },
 };
 </script>