瀏覽代碼

fix(商品上线):定价模式判断

snow 1 年之前
父節點
當前提交
c556c8f814

+ 1 - 1
src/apis/service/sellOut/combinedAdd/index.js

@@ -9,7 +9,7 @@ export default {
   // 分页查询
   list: (data, params) => http(api + 'combindlist', data, 'post', params),
   // 详情
-  detail: (data, params) => http(api + 'salediffinfo', data, 'post', params),
+  detail: (data, params) => http(api + 'combindinfo', data, 'post', params),
   // 更新
   update: (data, params) => http(api + 'update', data, 'post', params),
   // 修改状态

+ 7 - 1
src/views/goodStore/goodsOnline/ShowDataTableColumns.js

@@ -205,10 +205,16 @@ const public_listCol = [
     label: '备库起订量',
     span: 4
   },
+  {
+    prop: 'is_combind',
+    label: '组合类型',
+    span: 4,
+    _slot_:'is_combind'
+  },
   {
     prop: 'good_remark',
     label: '商品备注',
-    span: 16
+    span: 12
   },
   {
     prop: 'good_type',

+ 6 - 12
src/views/goodStore/goodsOnline/components/fixed-price-form.vue

@@ -1,6 +1,5 @@
 <template>
   <div v-loading="loading">
-    <!-- {{ sitem.is_gold_price }} -->
     <el-form
       :model="addrForm"
       ref="addrForm"
@@ -48,7 +47,7 @@
         <el-table-column
           prop="new_sale_price"
           show-overflow-tooltip
-          v-if="!(sitem && sitem.is_gold_price === '1' && is_noble)"
+          v-if="String(sitem.is_fixed) === '1'"
         >
           <template slot="header" slot-scope="scope">
             <span>系统售价</span>
@@ -78,7 +77,7 @@
           prop="sale_price"
           label="售价"
           show-overflow-tooltip
-          v-if="!(sitem && sitem.is_gold_price === '1' && is_noble)"
+          v-if="String(sitem.is_fixed) === '1'"
         >
           <template slot-scope="scope">
             <el-form-item
@@ -109,7 +108,7 @@
         <el-table-column
           prop="new_cost_fee"
           show-overflow-
-          v-if="sitem && sitem.is_gold_price === '1' && is_noble"
+          v-if="String(sitem.is_fixed) === '0'"
           label="系统工艺费"
         >
           <template slot-scope="scope">
@@ -136,7 +135,7 @@
           prop="cost_fee"
           label="工艺费"
           show-overflow-tooltip
-          v-if="sitem && sitem.is_gold_price === '1' && is_noble"
+          v-if="String(sitem.is_fixed) === '0'"
         >
           <template slot-scope="scope">
             <el-form-item
@@ -796,17 +795,12 @@ export default {
       const _costFee = Number(cost_fee) || 0;
       const _systemCostFee = Number(new_cost_fee) || 0;
 
-      console.log(this.sitem);
-
-      if (
-        Number(this.sitem.is_gold_price) !== 1 &&
-        _salePrice < _systemSalePrice
-      ) {
+      if (Number(this.sitem.is_fixed) === 1 && _salePrice < _systemSalePrice) {
         this.$message.warning("售价不能小于系统售价!");
         return;
       }
 
-      if (Number(this.sitem.is_gold_price) === 1 && _costFee < _systemCostFee) {
+      if (Number(this.sitem.is_fixed) === 0 && _costFee < _systemCostFee) {
         this.$message.warning("工艺费不能小于系统工艺费!");
         return;
       }

+ 5 - 2
src/views/goodStore/goodsOnline/detail.vue

@@ -45,7 +45,9 @@
                   <span v-else>暂无凭证</span>
                 </template>
 
-                <tempalte slot="is_fixed">{{String(sitem.is_fixed) === "1" ? '实时金价' : '一口价'}}</tempalte>
+                <template slot="is_combind">{{String(sitem.is_combind) === '1' ? '组合商品' : '非组合商品'}}</template>
+
+                <tempalte slot="is_fixed">{{String(sitem.is_fixed) === "0" ? '实时金价' : '一口价'}}</tempalte>
 
                 <template slot="good_name">
                   <img
@@ -287,10 +289,11 @@
               </show-data-table>
             </el-collapse-item>
 
+            <!--  -->
             <el-collapse-item
-              v-if="status == '2' && ppowers.some((i) => i == '2') && !isSupertube"
               title="待产品审核"
               name="1"
+              v-if="status == '2' && ppowers.some((i) => i == '2') && !isSupertube"
             >
               <FixedPriceForm
                 :newTime="newTime"

+ 34 - 26
src/views/purchaseIn/wsmInOrder/detail.vue

@@ -3,7 +3,7 @@
     <div style="width: 100%" v-if="powers.some((i) => i == '007')">
       <!-- <div class="detail-page-title">
         <span class="title">入库单编号:{{ queryId }}</span>
-      </div> -->
+      </div>-->
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
@@ -19,14 +19,14 @@
                   <el-popover placement="top" width="300" trigger="hover">
                     <ul>
                       <li>
-                        <span>购买方公司编号:</span><span>{{ sitem.companyNo }}</span>
+                        <span>购买方公司编号:</span>
+                        <span>{{ sitem.companyNo }}</span>
                       </li>
                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
                   </el-popover>
                 </template>
                 <template slot="wsm">
-                  <!-- {{ sitem.wsm_supplier }}/ -->
                   <span>{{ sitem.wsm_name }}</span>
                   <el-popover placement="top" width="300" trigger="hover">
                     <ul>
@@ -61,14 +61,16 @@
                   ></el-tag>
                 </template>
                 <template slot="sendtype">
-                  <span>{{
+                  <span>
+                    {{
                     sitem.sendtype + "" == "1"
-                      ? "公司自提"
-                      : sitem.sendtype + "" === "2"
-                      ? "供应商包邮"
-                      : "--"
-                  }}</span></template
-                >
+                    ? "公司自提"
+                    : sitem.sendtype + "" === "2"
+                    ? "供应商包邮"
+                    : "--"
+                    }}
+                  </span>
+                </template>
               </show-data-table>
             </el-collapse-item>
             <el-collapse-item title="商品信息" name="2">
@@ -129,28 +131,29 @@ export default {
   name: "wsmInOrderDetail",
   mixins: [resToken],
   components: {
-    wsmIn,
+    wsmIn
   },
   computed: {
-    ...mapGetters(["isSupertube","userInfo"]),
-    canInStock(){
-      const { contactor } = this.sitem || {}
-      const { id } = this.userInfo || {}
-      if(!contactor || !id) return false
-      return String(contactor) === String(id)
+    ...mapGetters(["isSupertube", "userInfo"]),
+    canInStock() {
+      const { contactor } = this.sitem || {};
+      const { id } = this.userInfo || {};
+      if (!contactor || !id) return false;
+      return String(contactor) === String(id);
     },
     powers() {
       const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "wsmInOrderDetail") || {};
+      const tran =
+        btnList.find(item => item.menu_route == "wsmInOrderDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     ppowers() {
       const { roleProcess } = this.$store.getters;
-      const tran = roleProcess.find((i) => i.process_type === "RKD") || {};
+      const tran = roleProcess.find(i => i.process_type === "RKB") || {};
       const { action } = tran ?? {};
       return action ?? [];
-    },
+    }
   },
   data() {
     return {
@@ -164,12 +167,13 @@ export default {
 
       newTime: "",
       loading: false,
-      queryId: "",
+      queryId: ""
     };
   },
   mounted() {
     this.status = "";
     this.queryId = this.$route.query.id;
+
     this.initData();
   },
   methods: {
@@ -180,14 +184,14 @@ export default {
       let model = {
         wsm_in_code: this.queryId,
         remark: remark || "",
-        status: status,
+        status: status
       };
       const res = await asyncRequest.orderinstatus(model);
       this.loading = false;
       if (res && res.code === 0) {
         this.$notify.success({
           title: message + "成功!",
-          message: "",
+          message: ""
         });
         this.initData();
       } else if (res && res.code >= 100 && res.code <= 104) {
@@ -199,7 +203,11 @@ export default {
     async examForm(e) {
       if (!this.loading) {
         let type =
-          e.state + "" === "1" ? (this.sitem.return_num + "" === "0" ? "4" : "5") : "2";
+          e.state + "" === "1"
+            ? this.sitem.return_num + "" === "0"
+              ? "4"
+              : "5"
+            : "2";
         await this.setStatus(type, "提交入库方审核", e.remark);
       }
     },
@@ -221,7 +229,7 @@ export default {
       } else {
         this.$message.warning(res.message);
       }
-    },
-  },
+    }
+  }
 };
 </script>

+ 35 - 9
src/views/sellOut/combinedAdd/columns.js

@@ -1,29 +1,31 @@
 const columns = [
   {
-    prop: 'TODO',
+    prop: 'stockCode',
     label: '库存申请编码',
     fixed: 'left',
     minWidth: '152px'
   },
   {
-    prop: 'TODO',
+    prop: 'spuCode',
     label: '商品编码',
     minWidth: '125px'
   },
   {
     prop: 'TODO',
     label: '商品分类',
-    minWidth: '125px'
+    minWidth: '125px',
+    _slot_:'catinfo'
   },
   {
-    prop: 'TODO',
+    prop: 'good_name',
     label: '商品名称',
-    minWidth: '125px'
+    minWidth: '125px',
   },
   {
     prop: 'TODO',
     label: '商品规格',
-    minWidth: '125px'
+    minWidth: '125px',
+    _slot_:'spec'
   },
   {
     prop: 'status',
@@ -32,12 +34,12 @@ const columns = [
     width: '100px'
   },
   {
-    prop: 'TODO',
+    prop: 'apply_name',
     label: '申请人',
     width: '90px'
   },
   {
-    prop: 'addtime',
+    prop: 'createtime',
     label: '创建时间',
     width: '155px'
   },
@@ -107,4 +109,28 @@ const showColumns = [
     span: 18
   }
 ]
-export { columns, showColumns }
+
+const detailColumns = [
+  {
+    prop: 'stockCode',
+    label: '库存申请编号',
+    span: 8
+  },
+  {
+    prop:'good_name',
+    label:'商品名称',
+    span:8
+  },
+  {
+    prop:'createtime',
+    label:'创建时间',
+    span:8
+  },
+  {
+    label:'仓库名称',
+    prop:'wsm_name',
+    span:8
+  }
+]
+
+export { columns, showColumns, detailColumns }

+ 15 - 6
src/views/sellOut/combinedAdd/components/waitApproval.vue

@@ -1,9 +1,9 @@
 <template>
-  <el-form label-width="80px" size="mini" :model="ruleForm" :rules="rules">
+  <el-form ref="ruleForm" label-width="80px" size="mini" :model="ruleForm" :rules="rules">
     <el-form-item label="状态" prop="status">
       <el-select v-model="ruleForm.status" style="width:100%">
-        <el-option value="1" label="通过" />
-        <el-option value="0" label="驳回" />
+        <el-option value="2" label="通过" />
+        <el-option value="3" label="驳回" />
       </el-select>
     </el-form-item>
 
@@ -13,7 +13,7 @@
 
     <el-form-item>
       <div class="fr">
-        <el-button type="primary">保 存</el-button>
+        <el-button type="primary" @click="submit">保 存</el-button>
       </div>
     </el-form-item>
   </el-form>
@@ -29,7 +29,7 @@ export default {
         status: [{ required: true, message: "请选择状态", trigger: "change" }],
         remark: [
           {
-            required: this.ruleForm.status === "0",
+            required: this.ruleForm.status === "3",
             message: "请输入备注",
             trigger: "change"
           }
@@ -40,10 +40,19 @@ export default {
   data() {
     return {
       ruleForm: {
-        status: "1",
+        status: "2",
         remark: ""
       }
     };
+  },
+  methods: {
+    submit() {
+      const { status, remark } = this.ruleForm;
+      this.$emit("confirm", {
+        status,
+        remark
+      });
+    }
   }
 };
 </script>

+ 16 - 14
src/views/sellOut/combinedAdd/detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="zxDiffOrderDetail pagePadding">
-    <div style="width: 100%" v-if="powers.some((i) => i == '007')">
+    <div style="width: 100%" v-if="powers.some((i) => i == '007')" v-loading="loading">
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
@@ -9,9 +9,15 @@
             </el-collapse-item>
 
             <template v-else>
-              <el-collapse-item title="组合商品详情" name="2">TODO..</el-collapse-item>
-              <el-collapse-item title="待审核" name="3">
-                <wait-approval />
+              <el-collapse-item title="组合商品详情" name="2" v-if="sitem">
+                <show-data-table :sitem="sitem" :newTime="newTime" :columns="detailColumns" />
+              </el-collapse-item>
+              <el-collapse-item
+                title="待审核"
+                name="3"
+                v-if="Number(sitem.status) === 1 && !isSupertube"
+              >
+                <wait-approval @confirm="setStatus" />
               </el-collapse-item>
             </template>
           </el-collapse>
@@ -28,7 +34,7 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/combinedAdd";
-import { showColumns } from "./columns";
+import { showColumns, detailColumns } from "./columns";
 import { xs_order_type_options } from "@/assets/js/statusList";
 import WaitApproval from "./components/waitApproval";
 
@@ -65,6 +71,7 @@ export default {
         { value: "1", label: "待业务部门审核" },
         { value: "2", label: "审批已完成" }
       ],
+      detailColumns,
       xs_order_type_options,
       customer_remark_options: [
         {
@@ -97,7 +104,7 @@ export default {
     this.status = "";
     this.queryId = this.$route.query.id;
 
-    if(this.queryId !== "add"){
+    if (this.queryId !== "add") {
       this.initData();
     }
   },
@@ -106,23 +113,18 @@ export default {
       this.newTime = new Date().valueOf() + "";
     },
 
-    async setStatus() {
+    async setStatus(parm) {
       if (!this.loading) {
         this.loading = true;
 
         let model = {
           id: this.queryId,
-          remark: "",
-          status: ""
+          ...parm
         };
 
-        const res = await asyncRequest.fstatus(model);
+        const res = await asyncRequest.status(model);
         this.loading = false;
         if (res && res.code === 0) {
-          this.$notify.success({
-            title: "通知成功!",
-            message: ""
-          });
           this.initData();
         } else if (res && res.code >= 100 && res.code <= 104) {
           await this.logout();