Pārlūkot izejas kodu

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

snow 2 gadi atpakaļ
vecāks
revīzija
e35410e301
24 mainītis faili ar 1731 papildinājumiem un 2571 dzēšanām
  1. 5 0
      src/apis/components/type-change-item.js
  2. 21 10
      src/assets/js/statusList.js
  3. 2 0
      src/components/globalComponents/type-change-item/index.js
  4. 653 0
      src/components/globalComponents/type-change-item/main.vue
  5. 0 0
      src/components/globalComponents/type-change-item/基础数据修改记录
  6. 437 431
      src/views/goodStore/goodsCost/columns.js
  7. 185 153
      src/views/goodStore/goodsCost/detail.vue
  8. 69 31
      src/views/goodStore/goodsCost/index.vue
  9. 5 9
      src/views/goodStore/goodsOnline/columns.js
  10. 0 234
      src/views/goodStore/goodsOnline/components/handle-online-form.vue
  11. 0 242
      src/views/goodStore/goodsOnline/components/online-exam-form.vue
  12. 199 508
      src/views/goodStore/goodsOnline/components/online-form.vue
  13. 9 67
      src/views/goodStore/goodsOnline/detail.vue
  14. 11 16
      src/views/goodStore/goodsOnline/index.vue
  15. 25 0
      src/views/purchaseIn/purchaseOrder/columns.js
  16. 56 36
      src/views/purchaseIn/purchaseOrder/index.vue
  17. 14 12
      src/views/purchaseIn/wsmInOrder/columns.js
  18. 0 358
      src/views/purchaseIn/wsmInOrder/components/wsm-in-order-record-form.vue
  19. 0 246
      src/views/purchaseIn/wsmInOrder/components/wsm-in-order-return-form.vue
  20. 7 67
      src/views/purchaseIn/wsmInOrder/components/wsm-in.vue
  21. 15 78
      src/views/purchaseIn/wsmInOrder/detail.vue
  22. 6 13
      src/views/sellOut/bargainList/columns.js
  23. 7 54
      src/views/sellOut/bargainList/detail.vue
  24. 5 6
      src/views/youzan/othgoodsOnline/columns.js

+ 5 - 0
src/apis/components/type-change-item.js

@@ -0,0 +1,5 @@
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+    changeItem: (data, params) => http(api + "goodchangelog", data, "post", params),
+};

+ 21 - 10
src/assets/js/statusList.js

@@ -7,13 +7,13 @@ const cg_order_type_options = [
   { id: "2", label: "非库存商品" },
   { id: "3", label: "反馈商品" },
   { id: "4", label: "报备商品" },
-]
+];
 const xs_order_type_options = [
   { id: "1", label: "库存商品" },
   { id: "2", label: "非库存商品" },
   { id: "3", label: "反馈商品" },
   { id: "4", label: "报备商品" },
-]
+];
 const cg_order_source_options = [
   { id: "0", label: "备库单" },
   { id: "1", label: "直接下单" },
@@ -26,7 +26,7 @@ const cg_order_source_options = [
   // { id: "8", label: "支付渠道" }
   { id: "9", label: "采销录单" },
   // { id: "10", label: "结算录单" }
-]
+];
 const xs_order_source_options = [
   // { id: "0", label: "备库单" },
   { id: "1", label: "直接下单" },
@@ -39,12 +39,23 @@ const xs_order_source_options = [
   // { id: "8", label: "支付渠道" },
   { id: "9", label: "采销录单" },
   // { id: "10", label: "结算录单" }
-]
-
+];
+const has_account_list = [
+  { code: "1", type: "", name: "已开通" },
+  { code: "0", type: "info", name: "未开通" },
+];
 const accountLevels = {
-  super:'1',
-  business:'2',
-  supplier:'3'
-}
+  super: "1",
+  business: "2",
+  supplier: "3",
+};
 
-export { statusList, cg_order_type_options, xs_order_type_options, cg_order_source_options, xs_order_source_options, accountLevels };
+export {
+  statusList,
+  cg_order_type_options,
+  xs_order_type_options,
+  cg_order_source_options,
+  xs_order_source_options,
+  accountLevels,
+  has_account_list,
+};

+ 2 - 0
src/components/globalComponents/type-change-item/index.js

@@ -0,0 +1,2 @@
+import Main from './main.vue'
+export default Main

+ 653 - 0
src/components/globalComponents/type-change-item/main.vue

@@ -0,0 +1,653 @@
+<template>
+  <div>
+    <el-row>
+      <el-col :span="8"> 数据编码:{{ code }}</el-col>
+      <el-col :span="5">
+        数据类型:
+        <el-tag
+          :size="tablebtnSize"
+          v-text="(typeOptions.find((item) => item.value == type) || {}).label || '--'"
+        ></el-tag>
+      </el-col>
+      <el-col :span="5"> 修改账户:{{ creater }}</el-col>
+      <el-col :span="6"> 修改时间:{{ addtime }}</el-col>
+    </el-row>
+
+    <el-table
+      :data="tableData"
+      :size="searchSize"
+      border
+      stripe
+      max-height="750px"
+      style="width: 100%; margin: 10px 0 0 0"
+    >
+      <el-table-column
+        prop="key_name"
+        label="修改字段名称"
+        width="130px"
+        show-overflow-tooltip
+      />
+      <el-table-column prop="key" label="修改字段" width="130px" show-overflow-tooltip />
+      <el-table-column prop="before" label="修改前" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <div v-if="scope.row.key === 'good_img'">
+            <img
+              v-for="(si, sii) in scope.row.before"
+              :key="si + sii"
+              :src="si"
+              alt=""
+              class="fl"
+              v-viewer
+              style="width: 30px; height: 30px"
+            />
+          </div>
+          <div v-else-if="scope.row.key === 'good_info_img'">
+            <img
+              v-for="(si, sii) in scope.row.after"
+              :key="si + sii"
+              :src="si"
+              alt=""
+              v-viewer
+              class="fl"
+              style="width: 30px; height: 30px"
+            />
+          </div>
+          <div v-else-if="scope.row.key === 'good_thumb_img'">
+            <img
+              v-for="(si, sii) in scope.row.after"
+              :key="si + sii"
+              :src="si"
+              alt=""
+              v-viewer
+              class="fl"
+              style="width: 30px; height: 30px"
+            />
+          </div>
+          <div v-else>{{ scope.row.before }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="after" label="修改后" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <div v-if="scope.row.key === 'good_img'">
+            <img
+              v-for="(si, sii) in scope.row.after"
+              :key="si + sii"
+              :src="si"
+              alt=""
+              v-viewer
+              class="fl"
+              style="width: 30px; height: 30px"
+            />
+          </div>
+          <div v-else-if="scope.row.key === 'good_info_img'">
+            <img
+              v-for="(si, sii) in scope.row.after"
+              :key="si + sii"
+              :src="si"
+              alt=""
+              v-viewer
+              class="fl"
+              style="width: 30px; height: 30px"
+            />
+          </div>
+          <div v-else-if="scope.row.key === 'good_thumb_img'">
+            <img
+              v-for="(si, sii) in scope.row.after"
+              :key="si + sii"
+              :src="si"
+              alt=""
+              v-viewer
+              class="fl"
+              style="width: 30px; height: 30px"
+            />
+          </div>
+          <div v-else>{{ scope.row.after }}</div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/components/type-change-item";
+export default {
+  name: "typeChangeItem",
+  mixins: [resToken],
+  props: ["type", "code"],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+  },
+  data() {
+    return {
+      loading: false,
+      tableData: [],
+      showItem: null,
+      creater: "",
+      addtime: "",
+      typeOptions: [
+        {
+          value: "1",
+          label: "供应商信息",
+        },
+        {
+          value: "2",
+          label: "客户信息",
+        },
+        {
+          value: "3",
+          label: "商品成本信息",
+        },
+        {
+          value: "4",
+          label: "单位信息",
+        },
+        {
+          value: "5",
+          label: "规格信息",
+        },
+        {
+          value: "6",
+          label: "品牌信息",
+        },
+        {
+          value: "7",
+          label: "分类信息",
+        },
+        {
+          value: "8",
+          label: "平台信息",
+        },
+      ],
+      editTable13: [
+        {
+          prop: "infoNo",
+          label: "阶梯编号",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "good_name",
+          label: "商品名称",
+          minWidth: "200px",
+        },
+        {
+          prop: "brandid",
+          label: "商品品牌",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "cat_id",
+          label: "商品分类",
+          minWidth: "200px",
+        },
+        {
+          prop: "specinfo",
+          label: "规格集合",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "cost_desc",
+          label: "工艺描述",
+          minWidth: "200px",
+        },
+        {
+          prop: "work_day",
+          label: "工期",
+          minWidth: "200px",
+        },
+        {
+          prop: "delivery_day",
+          label: "物流时间",
+          minWidth: "200px",
+        },
+        {
+          prop: "good_img",
+          label: "商品主图",
+          minWidth: "200px",
+        },
+        {
+          prop: "expire_day",
+          label: "有效时间",
+          minWidth: "200px",
+        },
+        {
+          prop: "origin_place",
+          label: "产地",
+          minWidth: "200px",
+        },
+        {
+          prop: "supplierNo",
+          label: "供应商",
+          minWidth: "200px",
+        },
+        {
+          prop: "pay_way",
+          label: "支付方式",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "send_way",
+          label: "发货方式",
+          minWidth: "200px",
+        },
+        {
+          prop: "metal_id",
+          label: "金属种类",
+          minWidth: "200px",
+        },
+        {
+          prop: "is_gold_price",
+          label: "是否启用实时金价",
+          minWidth: "200px",
+        },
+        {
+          prop: "config",
+          label: "配置要求",
+          minWidth: "200px",
+        },
+        {
+          prop: "weight",
+          label: "商品总重量",
+          minWidth: "200px",
+        },
+        {
+          prop: "is_diff",
+          label: "有无工差",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "demo_fee",
+          label: "打样费",
+          minWidth: "200px",
+        },
+        {
+          prop: "delivery_fee",
+          label: "物流费",
+          minWidth: "200px",
+        },
+        {
+          prop: "open_fee",
+          label: "开模费",
+          minWidth: "200px",
+        },
+        {
+          prop: "pakge_fee",
+          label: "打包费",
+          minWidth: "200px",
+        },
+        {
+          prop: "nake_fee",
+          label: "裸价",
+          minWidth: "200px",
+        },
+        {
+          prop: "mark_fee",
+          label: "加标费",
+          minWidth: "200px",
+        },
+        {
+          prop: "cert_fee",
+          label: "证书费",
+          minWidth: "200px",
+        },
+        {
+          prop: "cost_fee",
+          label: "工艺费",
+          minWidth: "200px",
+        },
+        {
+          prop: "total_fee",
+          label: "成本总计",
+          minWidth: "200px",
+        },
+        {
+          prop: "supply_area",
+          label: "供货区域",
+          minWidth: "200px",
+        },
+        {
+          prop: "remark",
+          label: "备注",
+          minWidth: "200px",
+        },
+        // {
+        //   prop: "sale_price",
+        //   label: "最终售价",
+        //   minWidth: "200px",
+        // },
+        // {
+        //   prop: "createrid",
+        //   label: "创建人id",
+        //   minWidth: "200px",
+        // },
+        {
+          prop: "creater",
+          label: "创建人",
+          minWidth: "200px",
+        },
+        // {
+        //   prop: "status",
+        //   label: "状态",
+        //   minWidth: "200px",
+        // },
+
+        {
+          prop: "unit",
+          label: "单位",
+          minWidth: "200px",
+        },
+        {
+          prop: "cat_info",
+          label: "分类",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "supplierName",
+          label: "供应商名称",
+          minWidth: "200px",
+        },
+        {
+          prop: "brand_name",
+          label: "品牌名称",
+          minWidth: "200px",
+        },
+        {
+          prop: "metal_name",
+          label: "贵金属名称",
+          minWidth: "200px",
+        },
+        {
+          prop: "delivery_place",
+          label: "发货地",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "good_code",
+          label: "商品code",
+          minWidth: "200px",
+        },
+        {
+          prop: "good_unit",
+          label: "商品单位",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "good_type",
+          label: "是否定制",
+          minWidth: "200px",
+        },
+        {
+          prop: "companyNo",
+          label: "业务企业",
+          minWidth: "200px",
+        },
+        {
+          prop: "company_id",
+          label: "业务公司",
+          minWidth: "200px",
+        },
+        {
+          prop: "moq",
+          label: "定制起订量",
+          minWidth: "200px",
+        },
+        {
+          prop: "customized",
+          label: "定制工期",
+          minWidth: "200px",
+        },
+        {
+          prop: "tax",
+          label: "税点",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "is_auth",
+          label: "销售权限",
+          minWidth: "200px",
+        },
+        {
+          prop: "is_stock",
+          label: "是否库存品",
+          minWidth: "200px",
+        },
+        {
+          prop: "auth_img",
+          label: "销售授权图片",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "after_sales",
+          label: "售后说明",
+          minWidth: "200px",
+        },
+        {
+          prop: "craft_desc",
+          label: "工艺说明",
+          minWidth: "200px",
+        },
+        {
+          prop: "good_remark",
+          label: "商品备注",
+          minWidth: "200px",
+        },
+        {
+          prop: "good_size",
+          label: "商品尺寸",
+          minWidth: "200px",
+        },
+        {
+          prop: "packing_way",
+          label: "包装方式",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "packing_size",
+          label: "装箱尺寸",
+          minWidth: "200px",
+        },
+        {
+          prop: "packing_spec",
+          label: "装箱规格",
+          minWidth: "200px",
+        },
+        {
+          prop: "packing_list",
+          label: "包装清单",
+          minWidth: "200px",
+        },
+        {
+          prop: "packing_weight",
+          label: "装箱重量",
+          minWidth: "200px",
+        },
+        {
+          prop: "good_bar",
+          label: "商品条形码",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "lead_time",
+          label: "供货周期",
+          minWidth: "200px",
+        },
+        {
+          prop: "sample_day",
+          label: "调样周期",
+          minWidth: "200px",
+        },
+        {
+          prop: "sample_fee",
+          label: "调样费",
+          minWidth: "200px",
+        },
+
+        {
+          prop: "good_thumb_img",
+          label: "商品缩略图",
+          minWidth: "200px",
+        },
+        {
+          prop: "good_info_img",
+          label: "详情介绍",
+          minWidth: "200px",
+        },
+
+        // {
+        //   prop: "is_del",
+        //   label: "是否删除",
+        //   minWidth: "200px",
+        // },
+        // {
+        //   prop: "addtime",
+        //   label: "创建时间",
+        //   minWidth: "200px",
+        // },
+        {
+          prop: "updatetime",
+          label: "更新时间",
+          minWidth: "200px",
+        },
+        {
+          prop: "is_exclusive",
+          label: "专属类型",
+          minWidth: "200px",
+        },
+        {
+          prop: "noble_weight",
+          label: "贵金属重量",
+          minWidth: "200px",
+        },
+        {
+          prop: "noble_metal",
+          label: "贵金属种类",
+          minWidth: "200px",
+        },
+        {
+          prop: "other_config",
+          label: "其他配置要求",
+          minWidth: "200px",
+        },
+        {
+          prop: "spec_value",
+          label: "规格类型",
+          minWidth: "200px",
+        },
+        {
+          prop: "spec_value_value",
+          label: "规格值",
+          minWidth: "200px",
+        },
+        {
+          prop: "market_price",
+          label: "市场价",
+          minWidth: "200px",
+        },
+        {
+          prop: "cgd_gold_price",
+          label: "供应商采购金价",
+          minWidth: "200px",
+        },
+        {
+          prop: "noble_price",
+          label: "当前金价",
+          minWidth: "200px",
+        },
+        {
+          prop: "min_num",
+          label: "起订量(>=)",
+          minWidth: "200px",
+        },
+        {
+          prop: "package_fee",
+          label: "包装费",
+          minWidth: "200px",
+        },
+        {
+          prop: "other_fee",
+          label: "其他费用",
+          minWidth: "200px",
+        },
+        {
+          prop: "nake_total",
+          label: "成本合计",
+          minWidth: "200px",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    async searchList() {
+      this.loading = true;
+      this.tableData = [];
+      this.showItem = null;
+      const { code, data, message } = await asyncRequest.changeItem({
+        type: this.type,
+        code: this.code,
+      });
+
+      if (code === 0) {
+        const { creater, addtime, before_info, after_info } = data;
+
+        this.creater = creater;
+        this.addtime = addtime;
+        let keyList = [];
+        for (let key in after_info) {
+          keyList.push(key);
+        }
+
+        for (let i = 0; i < keyList.length; i++) {
+          let index = this.editTable13.findIndex((s) => s.prop === keyList[i]);
+          if (index != -1) {
+            let model = {
+              key: keyList[i],
+              key_name:
+                (this.editTable13.find((s) => s.prop === keyList[i]) || {}).label || "--",
+              before: this.get_key_value(keyList[i], before_info),
+              after: this.get_key_value(keyList[i], after_info),
+            };
+            // console.log(model.key_name)
+            this.tableData.push(model);
+          }
+        }
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+
+      this.loading = false;
+    },
+    get_key_value(key, info) {
+      if (key === "good_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      } else if (key === "good_info_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      } else if (key === "good_thumb_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      // else if(key === "cat_id") {
+      //   return info[key] ? (info[key] || "").split(",") : [];
+      // }
+      return info[key];
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 0 - 0
src/components/globalComponents/type-change-item/基础数据修改记录


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 437 - 431
src/views/goodStore/goodsCost/columns.js


+ 185 - 153
src/views/goodStore/goodsCost/detail.vue

@@ -14,153 +14,180 @@
         </el-tab-pane>
         <el-tab-pane label="商品成本详情" name="1" v-if="queryType !== 'add'">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
-            <tempalte v-if="queryType === 'editCoin' || queryType === 'editBase' || queryType === 'edit'">
+            <tempalte
+              v-if="
+                queryType === 'editCoin' ||
+                queryType === 'editBase' ||
+                queryType === 'edit'
+              "
+            >
               <el-collapse-item title="商品成本详情" name="0">
-              <base-form
-                v-if="newTime !== ''"
-                :type="queryType"
-                :id="queryId"
-                :newTime="newTime"
-                :sitem="sitem"
-                @refresh="refresh"
-              />
-            </el-collapse-item>
+                <base-form
+                  v-if="newTime !== ''"
+                  :type="queryType"
+                  :id="queryId"
+                  :newTime="newTime"
+                  :sitem="sitem"
+                  @refresh="refresh"
+                />
+              </el-collapse-item>
             </tempalte>
-       
 
             <template v-else>
               <el-collapse-item title="基础信息" name="1">
-              <show-data-table :columns="basicColumns" :sitem="sitem">
-                <template slot="good_img">
-                  <template v-if="sitem.good_img">
-                   <div style="max-height: 24px;overflow: hidden;">
-                    <el-image style="height: 24px;width: 24px;margin-right:5px" v-for="(img,index) in sitem.good_img.split(',')" :src="img" :preview-src-list="sitem.good_img.split(',')" :key="index" />
-                   </div>
+                <show-data-table :columns="basicColumns" :sitem="sitem">
+                  <template slot="good_img">
+                    <template v-if="sitem.good_img">
+                      <div style="max-height: 24px; overflow: hidden">
+                        <el-image
+                          style="height: 24px; width: 24px; margin-right: 5px"
+                          v-for="(img, index) in sitem.good_img.split(',')"
+                          :src="img"
+                          :preview-src-list="sitem.good_img.split(',')"
+                          :key="index"
+                        />
+                      </div>
+                    </template>
                   </template>
-                </template>
 
-                <template slot="good_info_img">
-                  <div style="max-height: 24px;overflow: hidden;">
-                    <el-image style="height: 24px;width: 24px" :src="sitem.good_info_img" :preview-src-list="[sitem.good_info_img]" />
-                  </div>
-                </template>
+                  <template slot="good_info_img">
+                    <div style="max-height: 24px; overflow: hidden">
+                      <el-image
+                        style="height: 24px; width: 24px"
+                        :src="sitem.good_info_img"
+                        :preview-src-list="[sitem.good_info_img]"
+                      />
+                    </div>
+                  </template>
 
-                <template slot="cat_info">
-                  {{sitem.cat_info ? sitem.cat_info.map(({name}) => name).join('_') : '--' }}
-                </template>
+                  <template slot="cat_info">
+                    {{
+                      sitem.cat_info
+                        ? sitem.cat_info.map(({ name }) => name).join("_")
+                        : "--"
+                    }}
+                  </template>
 
-                <template slot="good_name">
-                  <img
-                    v-if="sitem.good_thumb_img"
-                    v-viewer
-                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
-                    class="fl"
-                    :src="sitem.good_thumb_img"
-                    alt=""
-                  >
-                  <span>{{ sitem.good_name }}</span>
-                  <span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
-                    <span v-if="i !== 0">-</span>
-                    <span v-else>_</span>
-                    <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
-                  </span>
-                  <el-popover placement="top" width="300" trigger="hover">
-                    <ul>
-                      <li
-                        v-if=" newTime !== '' && isDisplayPrivateField('1')"
-                      >
-                        <span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
-                      </li>
-                    </ul>
-                    <i slot="reference" class="el-icon-warning-outline fr" />
-                  </el-popover>
-                </template>
+                  <template slot="good_name">
+                    <img
+                      v-if="sitem.good_thumb_img"
+                      v-viewer
+                      style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                      class="fl"
+                      :src="sitem.good_thumb_img"
+                      alt=""
+                    />
+                    <span>{{ sitem.good_name }}</span>
+                    <span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
+                      <span v-if="i !== 0">-</span>
+                      <span v-else>_</span>
+                      <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+                    </span>
+                    <el-popover placement="top" width="300" trigger="hover">
+                      <ul>
+                        <li v-if="newTime !== '' && isDisplayPrivateField('1')">
+                          <span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
+                        </li>
+                      </ul>
+                      <i slot="reference" class="el-icon-warning-outline fr" />
+                    </el-popover>
+                  </template>
 
-                <template slot="noble">
-                   <span
-                     v-if="sitem.noble_metal"
-                   >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
-                     sitem.noble_name
-                   }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
-                     sitem.is_gold_price + '' === "0" ? "不" : ""
-                   }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
-                     sitem.config
-                   }}-{{ sitem.other_config }}</span>
+                  <template slot="noble">
+                    <span v-if="sitem.noble_metal"
+                      >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+                        sitem.noble_name
+                      }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
+                        sitem.is_gold_price + "" === "0" ? "不" : ""
+                      }}启用实时金价-{{ sitem.is_diff + "" === "1" ? "有" : "无" }}工差-{{
+                        sitem.config
+                      }}-{{ sitem.other_config }}</span
+                    >
                   </template>
-                
-                <template slot="weight">
-                  {{sitem.weight}}g
-                </template>
-                <template slot="tax">
-                  {{sitem.tax}}%
-                </template>
-                <template slot="is_stock">
-                  {{String(sitem.is_stock) === '0' ? '非库存品' : '库存品'}}
-                </template>
-                <template slot="is_exclusive">
-                  {{String(sitem.is_exclusive) === '0' ? '非泰康' : '泰康'}}
-                </template>
-                <template slot="noble_weight">{{sitem.noble_weight}}g</template>
-                <template slot="is_gold_price">{{String(sitem.is_gold_price) === '1' ? '是' : '否'}}</template>
-                <template slot="is_diff">{{String(sitem.is_diff) === '1' ? '有公差' : '无工差'}}</template>
 
-                <template slot="packing_weight">
-                  {{sitem.packing_weight}}g
-                </template>
+                  <template slot="weight"> {{ sitem.weight }}g </template>
+                  <template slot="tax"> {{ sitem.tax }}% </template>
+                  <template slot="is_stock">
+                    {{ String(sitem.is_stock) === "0" ? "非库存品" : "库存品" }}
+                  </template>
+                  <template slot="is_exclusive">
+                    {{ String(sitem.is_exclusive) === "0" ? "非泰康" : "泰康" }}
+                  </template>
+                  <template slot="noble_weight">{{ sitem.noble_weight }}g</template>
+                  <template slot="is_gold_price">{{
+                    String(sitem.is_gold_price) === "1" ? "是" : "否"
+                  }}</template>
+                  <template slot="is_diff">{{
+                    String(sitem.is_diff) === "1" ? "有公差" : "无工差"
+                  }}</template>
 
-                <template slot="delivery_day">{{sitem.delivery_day}}天</template>
-                <template slot="lead_time">{{sitem.lead_time}}天</template>
-                <template slot="sample_day">{{sitem.sample_day}}天</template>
-                <template slot="delivery_place">{{delivery_place}}</template>
-                <template slot="origin_place">{{origin_place}}</template>
-              </show-data-table>
-            </el-collapse-item>
+                  <template slot="packing_weight"> {{ sitem.packing_weight }}g </template>
 
-            <el-collapse-item title="固定与阶梯成本" name="2" v-if="isDisplayPrivateField('1')">
-              <show-data-table :columns="ladderColumns" :sitem="sitem">
-                <template slot="demo_fee">{{sitem.demo_fee}}元</template>
-                <template slot="open_fee">{{sitem.open_fee}}元</template>
-                <template slot="sample_fee">{{sitem.sample_fee}}元</template>
-                <template slot="market_price">{{sitem.market_price}}元</template>
+                  <template slot="delivery_day">{{ sitem.delivery_day }}天</template>
+                  <template slot="lead_time">{{ sitem.lead_time }}天</template>
+                  <template slot="sample_day">{{ sitem.sample_day }}天</template>
+                  <template slot="delivery_place">{{ delivery_place }}</template>
+                  <template slot="origin_place">{{ origin_place }}</template>
+                </show-data-table>
+              </el-collapse-item>
 
-                <template slot="data_table">
-                  <el-table size="mini" :data="sitem.nakelist">
-                    <el-table-column prop="min_num" label="起订量(>=)" />
-                    <el-table-column prop="nake_fee" label="成本单价" />
-                    <el-table-column prop="cost_fee" label="工艺费" />
-                    <el-table-column prop="delivery_fee" label="物流费" />
-                    <el-table-column prop="cert_fee" label="证书费" />
-                    <el-table-column prop="mark_fee" label="加标费" />
-                    <el-table-column prop="package_fee" label="包装费" />
-                    <el-table-column prop="other_fee" label="其他费用" />
-                    <el-table-column prop="nake_total" label="成本合计" />
-                  </el-table>
-                </template>
-              </show-data-table>
-            </el-collapse-item>
+              <el-collapse-item
+                title="固定与阶梯成本"
+                name="2"
+                v-if="isDisplayPrivateField('1')"
+              >
+                <show-data-table :columns="ladderColumns" :sitem="sitem">
+                  <template slot="demo_fee">{{ sitem.demo_fee }}元</template>
+                  <template slot="open_fee">{{ sitem.open_fee }}元</template>
+                  <template slot="sample_fee">{{ sitem.sample_fee }}元</template>
+                  <template slot="market_price">{{ sitem.market_price }}元</template>
 
-            <el-collapse-item
-            name="3"
-              title="采购部门审批"
-              v-if="
-                ((status + '' === '0' && ppowers.some((i) => i == '0')) ||
-                  (status + '' === '2' && ppowers.some((i) => i == '2')) ||
-                  (status + '' === '3' && ppowers.some((i) => i == '3'))) &&
-                queryType === 'view'
-              "
-            >
-              <exam-form
-                :statusList="statusList"
-                :newTime="newTime"
-                :disabled="false"
-                :isMust="false"
-                @searchChange="examForm"
-              />
-            </el-collapse-item>
+                  <template slot="data_table">
+                    <el-table size="mini" :data="sitem.nakelist">
+                      <el-table-column prop="min_num" label="起订量(>=)" />
+                      <el-table-column prop="nake_fee" label="成本单价" />
+                      <el-table-column prop="cost_fee" label="工艺费" />
+                      <el-table-column prop="delivery_fee" label="物流费" />
+                      <el-table-column prop="cert_fee" label="证书费" />
+                      <el-table-column prop="mark_fee" label="加标费" />
+                      <el-table-column prop="package_fee" label="包装费" />
+                      <el-table-column prop="other_fee" label="其他费用" />
+                      <el-table-column prop="nake_total" label="成本合计" />
+                    </el-table>
+                  </template>
+                </show-data-table>
+              </el-collapse-item>
+
+              <el-collapse-item
+                name="3"
+                title="采购部门审批"
+                v-if="
+                  ((status + '' === '0' && ppowers.some((i) => i == '0')) ||
+                    (status + '' === '2' && ppowers.some((i) => i == '2')) ||
+                    (status + '' === '3' && ppowers.some((i) => i == '3'))) &&
+                  queryType === 'view'
+                "
+              >
+                <exam-form
+                  :statusList="statusList"
+                  :newTime="newTime"
+                  :disabled="false"
+                  :isMust="false"
+                  @searchChange="examForm"
+                />
+              </el-collapse-item>
             </template>
           </el-collapse>
         </el-tab-pane>
-        <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
+        <el-tab-pane label="最近修改记录" name="2" v-if="queryType !== 'add'">
+          <type-change-item
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'3'"
+            :code="queryId"
+          />
+        </el-tab-pane>
+        <el-tab-pane label="审批记录" name="3" v-if="queryType !== 'add'">
           <process-time-line
             v-if="newTime !== ''"
             :newTime="newTime"
@@ -169,10 +196,9 @@
           />
         </el-tab-pane>
 
-
-        <el-tab-pane label="流程图" name="3" v-if="queryType !== 'add'">
+        <el-tab-pane label="流程图" name="4" v-if="queryType !== 'add'">
           <flow-chart process_id="15" type="SPCB" :orderCode="queryId" />
-       </el-tab-pane>
+        </el-tab-pane>
       </el-tabs>
     </div>
     <div v-else>
@@ -185,18 +211,24 @@ import asyncRequest from "@/apis/service/goodStore/goodsCost";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import baseForm from "./components/baseForm";
-import costForm from './components/costDetail'
-import ShowDataTable from '@/views/standingBook/components/detail-data-table.vue'
-import { basicColumns, packingColumns, sendColumns, imageColumns, ladderColumns } from './columns'
+import costForm from "./components/costDetail";
+import ShowDataTable from "@/views/standingBook/components/detail-data-table.vue";
+import {
+  basicColumns,
+  packingColumns,
+  sendColumns,
+  imageColumns,
+  ladderColumns,
+} from "./columns";
 import privateField from "@/mixins/privateField";
 
 export default {
   name: "goodsCostDetail",
-  mixins: [resToken,privateField],
+  mixins: [resToken, privateField],
   components: {
     ShowDataTable,
     baseForm,
-    costForm
+    costForm,
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "originLevel"]),
@@ -204,7 +236,7 @@ export default {
     //   return (["1", '3']).includes(this.originLevel) || this.private_field.includes('1')
     // },
     powers() {
-      const { btnList } = this.$store.getters
+      const { btnList } = this.$store.getters;
       const tran = btnList.find((item) => item.menu_route == "goodsCostDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
@@ -234,8 +266,8 @@ export default {
       queryId: "",
       status: "",
       sitem: null,
-      delivery_place: '',
-      origin_place: ''
+      delivery_place: "",
+      origin_place: "",
     };
   },
   mounted() {
@@ -253,8 +285,8 @@ export default {
         this.getNewTime();
       } else {
         await this.initData();
-        await this.getArea('delivery_place');
-        await this.getArea('origin_place');
+        await this.getArea("delivery_place");
+        await this.getArea("origin_place");
       }
 
       this.loading = false;
@@ -265,30 +297,30 @@ export default {
       console.log(e);
       if (!this.loading) {
         let type = "";
-        if (e.state + '' === "1") {
+        if (e.state + "" === "1") {
           type = "1";
         } else {
           type =
-            this.status + '' === "0"
+            this.status + "" === "0"
               ? "6"
-              : this.status + '' === "2"
+              : this.status + "" === "2"
               ? "4"
-              : this.status + '' === "3"
+              : this.status + "" === "3"
               ? "5"
               : "";
         }
         await this.setstatus(type, "提交采购部门审核", e.remark);
       }
     },
-    async getArea(prop = 'delivery_place'){
-      const chunks = this.sitem[prop].split(',');
+    async getArea(prop = "delivery_place") {
+      const chunks = this.sitem[prop].split(",");
       let { data: province } = await asyncRequest.province();
-      province = province.find(({province_code}) => province_code === chunks[0])
-      let { data: city } = await  asyncRequest.city({code: chunks[0]})
-      city = city.find(({city_code}) => city_code === chunks[1])
-      let { data: area } = await asyncRequest.area({code: chunks[1]})
-      area = area.find(({area_code}) => area_code === chunks[2])
-      this[prop] = [province,city,area].map(({name}) => name).join("_")
+      province = province.find(({ province_code }) => province_code === chunks[0]);
+      let { data: city } = await asyncRequest.city({ code: chunks[0] });
+      city = city.find(({ city_code }) => city_code === chunks[1]);
+      let { data: area } = await asyncRequest.area({ code: chunks[1] });
+      area = area.find(({ area_code }) => area_code === chunks[2]);
+      this[prop] = [province, city, area].map(({ name }) => name).join("_");
     },
     async setstatus(type, detail, remark) {
       await this.$confirm(`确定要${detail}?`, {

+ 69 - 31
src/views/goodStore/goodsCost/index.vue

@@ -113,18 +113,40 @@
                 />
               </el-select>
             </el-col>
-            <el-col :span="3" style="margin:0 10px">
-              <search-supplier
-                  :size="'mini'"
-                  style="width: 220px"
-                  :value="supplierNo"
-                  :disabled="false"
-                  :placeholder="'供应商名称'"
-                  :names="''"
-                  :isDetail="false"
-                  :noDisabled="true"
-                  @searchChange="supplierChange"
+            <el-col :span="4" style="width: 147px; padding: 0 0 0 10px">
+              <el-select
+                v-model="parmValue.has_account"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="供应商账号"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in has_account_list"
+                  :key="'status' + item.code"
+                  :label="item.name"
+                  :value="item.code"
                 />
+              </el-select>
+            </el-col>
+            <el-col :span="3" style="margin: 0 10px">
+              <search-supplier
+                :size="'mini'"
+                style="width: 300px"
+                :value="supplierNo"
+                :disabled="false"
+                :placeholder="'供应商名称'"
+                :names="''"
+                :isDetail="false"
+                :noDisabled="true"
+                @searchChange="supplierChange"
+              />
             </el-col>
 
             <el-col
@@ -161,7 +183,7 @@
           </el-row>
 
           <el-row>
-            <el-col :span="4" style="width: 420px;margin-top: 10px;">
+            <el-col :span="4" style="width: 420px; margin-top: 10px">
               <el-input
                 :size="searchSize"
                 v-model="sinput"
@@ -220,6 +242,23 @@
           "
         ></el-tag>
       </template>
+      <template #has_account="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).type || '--'
+          "
+          v-text="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).name || '--'
+          "
+        ></el-tag>
+      </template>
       <template #isonline="{ scope }">
         <el-tag
           :size="tablebtnSize"
@@ -270,8 +309,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')
+            (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')
           "
           effect="dark"
           content="修改"
@@ -292,8 +330,7 @@
           v-if="
             ppowers.some((i) => i == '4') &&
             (scope.row.status + '' === '4' || scope.row.status + '' === '1') &&
-            (( scope.row.is_stock + '' === '0') ||
-              scope.row.is_stock + '' === '1')
+            (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')
           "
           effect="dark"
           content="修改基础信息"
@@ -309,8 +346,7 @@
           v-if="
             ppowers.some((i) => i == '5') &&
             (scope.row.status + '' === '5' || scope.row.status + '' === '1') &&
-            ((scope.row.is_stock + '' === '0') ||
-              scope.row.is_stock + '' === '1')
+            (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')
           "
           effect="dark"
           content="修改成本信息"
@@ -396,8 +432,9 @@
 <script>
 import asyncRequest from "@/apis/service/goodStore/goodsCost";
 import { listCol, options1, options4 } from "./columns";
+import { has_account_list } from "@/assets/js/statusList";
 import mixinPage from "@/mixins/elPaginationHandle";
-import companyHelper from '@/mixins/companyHelper'
+import companyHelper from "@/mixins/companyHelper";
 import addEdit from "./components/addEdit";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
@@ -421,8 +458,8 @@ export default {
       const tran =
         this.$store.getters.roleProcess.find((i) => i.process_type === "SPCB") || {};
       const { action } = tran ?? {};
-      console.log(action)
-      return action || []
+      console.log(action);
+      return action || [];
     },
   },
   data() {
@@ -435,6 +472,7 @@ export default {
     };
     return {
       dialogFormVisible: false,
+      has_account_list,
       donline_formStOps: [],
       donline_form: {
         offline_reason: "",
@@ -570,14 +608,14 @@ export default {
     this.searchList();
   },
   methods: {
-    handleCreate(){
-      if(!this.currentIsBusinessCompany()) return
-      this.routeGoto('goodsCostDetail', { id: 'add', type: 'add' })
+    handleCreate() {
+      if (!this.currentIsBusinessCompany()) return;
+      this.routeGoto("goodsCostDetail", { id: "add", type: "add" });
     },
     async supplierChange(e) {
       const { code, label } = e;
       this.supplierNo = code ? [code] : [];
-      this.searchList()
+      this.searchList();
     },
     // 获取异常原因下拉列表
     async getresultlist() {
@@ -686,7 +724,7 @@ export default {
         this.parmValue.supplierName = "";
       }
       // this.parmValue.brandid = this.brandid.toString();
-      this.pageInfo.curr = 1; 
+      this.pageInfo.curr = 1;
       this.parmValue.page = 1;
       await this.searchList();
     },
@@ -739,7 +777,7 @@ export default {
      * @param {String} status 0-禁用 1-启用
      */
     async changeStatus(id, status) {
-      await this.$confirm(`确定要改为${status + '' === "1" ? "禁用" : "启用"}?`, {
+      await this.$confirm(`确定要改为${status + "" === "1" ? "禁用" : "启用"}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -748,7 +786,7 @@ export default {
           this.loading = true;
           const model = {
             id: id,
-            status: status + '' === "1" ? "0" : "1",
+            status: status + "" === "1" ? "0" : "1",
           };
           const res = await asyncRequest.status(model);
           if (res && res.code === 0) {
@@ -815,10 +853,10 @@ export default {
       item.cat_id = item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : "";
       const res = await asyncRequest.list({
         ...item,
-        supplierNo:Array.isArray(this.supplierNo) ? this.supplierNo[0] : '',
-        needRela: true
+        supplierNo: Array.isArray(this.supplierNo) ? this.supplierNo[0] : "",
+        needRela: true,
       });
-      
+
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.tableData.forEach((a) => {

+ 5 - 9
src/views/goodStore/goodsOnline/columns.js

@@ -36,15 +36,11 @@ const options7 = [
   { id: '1', name: '是' }
 ]
 const options8 = [
-  // { id: "0", name: "待提交" },
-  { id: '1', name: '待完善成本' },
-  { id: '2', name: '待产品审核' },
-  { id: '3', name: '待财务定价' },
-  { id: '4', name: '待财务审核定价' },
-  { id: '5', name: '待上线' },
-  { id: '6', name: '上线成功' },
-  { id: '7', name: '审核失败' },
-  { id: '8', name: '已下线' }
+    { id: "1", name: "待完善成本",type:"info" },
+    { id: "2", name: "待产品审核",type:"warning" },
+    { id: "3", name: "上线已成功",type:"success" },
+    { id: "4", name: "上线已驳回",type:"danger" },
+    { id: "5", name: "商品已下线" ,type:"info"},
 ]
 const listCol = [
   {

+ 0 - 234
src/views/goodStore/goodsOnline/components/handle-online-form.vue

@@ -1,234 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    v-loading="loading"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    :label-width="labelWidth || '110px'"
-    class="demo-ruleForm-goodsOnline"
-    :size="'mini'"
-  >
-    <el-row>
-      <el-col
-        :span="12"
-      ><el-form-item label="审核状态" prop="state">
-        <el-radio-group
-          v-model="ruleForm.state"
-          placeholder="请选择审核状态"
-          style="width: 100%"
-          :size="size || 'medium'"
-          @change="stateChange"
-        >
-          <el-radio v-for="item in stateList" :key="item.value" :label="item.value">{{
-            item.label
-          }}</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      </el-col>
-      <el-col :span="12" class="tr">
-        <el-form-item v-if="ruleForm.state === '0'" label="审核备注" prop="remark">
-          <el-input
-            v-model="ruleForm.remark"
-            type="textarea"
-            placeholder="审核备注"
-            :disabled="disabled"
-            maxlength="250"
-            show-word-limit
-            :autosize="{ minRows: 3, maxRows: 3 }"
-          />
-        </el-form-item>
-        <el-form-item v-if="ruleForm.state + '' === '1'" class="fr">
-          <el-button
-            :size="'mini'"
-            type="primary"
-            @click="submitForm('6')"
-          >保 存
-          </el-button>
-        </el-form-item>
-
-        <el-form-item v-if="ruleForm.state + '' === '0'" class="fr">
-          <el-button
-            :size="'mini'"
-            type="primary"
-            @click="submitForm('')"
-          >驳回重新审核
-          </el-button>
-        </el-form-item>
-        <!-- <el-form-item class="fr" v-if="ruleForm.state === '0'" >
-          <el-button
-            :size="'mini'"
-            type="danger"
-            @click="submitForm('8')"
-            >驳回并下线
-          </el-button>
-        </el-form-item> -->
-      </el-col>
-      <el-col
-        v-if="ruleForm.state + '' === '1'"
-        :span="24"
-      ><el-form-item label="平台商品编码" prop="plat_code">
-        <el-input
-          v-model="ruleForm.plat_code"
-          placeholder="平台商品编码"
-          maxlength="100"
-        />
-      </el-form-item>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-
-<script>
-import costFormAddEdit from './costFormAddEdit'
-import asyncRequest from '@/apis/service/goodStore/goodsOnline'
-import { isnumber, isAlphanumeric, validAlphabets } from '@/utils/validate'
-export default {
-  name: 'ExamForm',
-  components: {
-    costFormAddEdit
-  },
-  props: ['size', 'statusList', 'disabled', 'isMust', 'labelWidth', 'id', 'code'],
-  /**
-   * 属性集合
-   * @param {String}        size             : 组件大小             非必填
-   * @param {Array}         statusList       : 驳回至备选项          必填
-   * @param {Boolean}       disabled         : 是否禁用              必填
-   * @param {Boolean}       isMust           : 是否需要展示驳回节点   必填
-   *
-   *
-   */
-  /**
-   * 事件集合
-   * @searchChange             : 选中值变化调用   抛出选中数据
-   */
-  data() {
-    const validate_plat_code = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('平台商品编号不能为空!'))
-      } else {
-        if (isnumber(value)) {
-          callback()
-        } else if (validAlphabets(value)) {
-          callback()
-        } else if (isAlphanumeric(value)) {
-          callback()
-        } else {
-          callback('平台商品编号仅支持数字和字母!')
-        }
-      }
-    }
-    return {
-      stateList: [
-        {
-          value: '1',
-          label: '通过'
-        },
-        {
-          value: '0',
-          label: '驳回'
-        }
-      ],
-      loading: false,
-
-      showModelThis: this.showModel,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000
-        }
-      },
-
-      ruleForm: {
-        state: '1', // 通过or驳回
-        remark: '',
-        plat_code: ''
-      },
-      rulesThis: this.rules,
-      rules: {
-        plat_code: [
-          {
-            required: true,
-            validator: validate_plat_code,
-            trigger: 'blur'
-          }
-        ],
-        state: [
-          {
-            required: true,
-            message: '请选择审核状态',
-            trigger: 'change'
-          }
-        ],
-        remark: [
-          { required: true, message: '请输入审核备注', trigger: 'blur' },
-          {
-            min: 1,
-            max: 250,
-            message: '长度在 1 到 250 个字符',
-            trigger: 'blur'
-          }
-        ]
-      }
-    }
-  },
-  newTime: function(val) {
-    if (val) {
-      this.initForm()
-    }
-  },
-  mounted() {
-    this.initForm()
-  },
-  methods: {
-    async initForm() {
-      this.loading = true
-      this.rulesThis = this.rules
-      await this.resetForm()
-      this.loading = false
-    },
-
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields()
-          this.$refs.ruleForm.clearValidate()
-
-          this.ruleForm = {
-            plat_code: this.code || '',
-            state: '1', // 通过or驳回
-            remark: ''
-          }
-        }
-      })
-    },
-    async submitForm(numStatus) {
-      this.ruleForm.numStatus = numStatus
-      await this.$refs.ruleForm.validate(async(valid) => {
-        if (valid) {
-          const model = JSON.parse(JSON.stringify(this.ruleForm))
-          // 刷新
-          this.$emit('resSuccess', model)
-          // this.routeReGoto("goodsOnline", {});
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.demo-ruleForm-goodsOnline {
-  .shangchuan-ul {
-    li {
-      position: relative;
-      width: 100%;
-      &.tupian {
-      }
-    }
-  }
-}
-</style>

+ 0 - 242
src/views/goodStore/goodsOnline/components/online-exam-form.vue

@@ -1,242 +0,0 @@
-<template>
-  <el-form
-    v-loading="loading"
-    ref="ruleForm"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    :label-width="labelWidth || '100px'"
-    class="demo-ruleForm"
-    :size="size || 'medium'"
-  >
-    <el-row>
-      <el-col :span="12"
-        ><el-form-item label="审核状态" prop="state">
-          <el-radio-group
-            v-model="ruleForm.state"
-            placeholder="请选择审核状态"
-            style="width: 100%"
-            :size="size || 'medium'"
-            @change="stateChange"
-          >
-            <el-radio
-              v-for="item in stateList"
-              :key="item.value"
-              :label="item.value"
-              >{{ item.label }}</el-radio
-            >
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item
-          label="上线时间"
-          prop="online_time"
-          v-if="ruleForm.state + '' === '1'"
-        >
-          <el-date-picker
-            v-model="ruleForm.online_time"
-            type="datetime"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            style="width: 100%"
-            :picker-options="pickerOptions"
-            placeholder="上线时间"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item
-          label="审核备注"
-          v-if="ruleForm.state + '' === '0'"
-          prop="remark"
-        >
-          <el-input
-            type="textarea"
-            placeholder="审核备注"
-            v-model="ruleForm.remark"
-            :disabled="disabled"
-            maxlength="250"
-            show-word-limit
-            :autosize="{ minRows: 3, maxRows: 3 }"
-          />
-        </el-form-item>
-        <el-form-item class="fr" v-if="ruleForm.state + '' === '1'" >
-          <el-button
-            v-if="!isDetail"
-            :size="'mini'"
-            type="primary"
-            @click="submitForm('3')"
-            >保 存
-          </el-button>
-        </el-form-item>
-
-        <el-form-item class="fr" v-if="ruleForm.state + '' === '0'" >
-          <el-button
-            v-if="!isDetail"
-            :size="'mini'"
-            type="primary"
-            @click="submitForm('')"
-            >提交
-          </el-button>
-        </el-form-item>
-        <!-- <el-form-item class="fr" v-if="ruleForm.state === '0'" >
-          <el-button
-            v-if="!isDetail"
-            :size="'mini'"
-            type="danger"
-            @click="submitForm('8')"
-            >驳回并下线
-          </el-button>
-        </el-form-item> -->
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-
-<script>
-export default {
-  name: "exam-form",
-  props: ["size", "statusList", "disabled", "isMust", "labelWidth", "time"],
-  /**
-   * 属性集合
-   * @param {String}        size             : 组件大小             非必填
-   * @param {Array}         statusList       : 驳回至备选项          必填
-   * @param {Boolean}       disabled         : 是否禁用              必填
-   * @param {Boolean}       isMust           : 是否需要展示驳回节点   必填
-   *
-   *
-   */
-  /**
-   * 事件集合
-   * @searchChange             : 选中值变化调用   抛出选中数据
-   */
-  data() {
-    return {
-      loading: false,
-      stateList: [
-        {
-          value: "1",
-          label: "通过",
-        },
-        {
-          value: "0",
-          label: "驳回",
-        },
-      ],
-      showModelThis: this.showModel,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000;
-        },
-      },
-      ruleForm: {
-        numStatus:"",//点击的按钮状态
-        state: "1", // 通过or驳回
-        rebut: "", //驳回至
-        online_time: "",
-        remark: "",
-      },
-      rulesThis: this.rules,
-      rules: {
-        state: [
-          {
-            required: true,
-            message: "请选择审核状态",
-            trigger: "change",
-          },
-        ],
-        online_time: [
-          {
-            required: true,
-            message: "请选择上线时间",
-            trigger: "change",
-          },
-        ],
-        rebut: [
-          {
-            required: true,
-            message: "请选择驳回节点",
-            trigger: "change",
-          },
-        ],
-        
-        remark: [
-          { required: true, message: "请输入审核备注", trigger: "blur" },
-          {
-            min: 1,
-            max: 250,
-            message: "长度在 1 到 250 个字符",
-            trigger: "blur",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    isDetail: function (val, old) {
-      if (this.isDetail !== val) {
-        this.options = [];
-        this.selectLoading = false;
-      }
-    },
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.stateChange();
-      this.loading = false;
-    },
-    stateChange() {
-      if (this.ruleForm.state + '' === "1") {
-        this.rulesThis.rebut[0].required = false;
-        this.rulesThis.remark[0].required = false;
-      } else {
-        this.rulesThis.rebut[0].required = true;
-        this.rulesThis.remark[0].required = true;
-      }
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.ruleForm = {
-            state: "1", // 通过or驳回
-            rebut: "", //驳回至
-            online_time: this.time || "",
-            remark: "",
-          };
-        }
-      });
-    },
-    async submitForm(numStatus) {
-      this.ruleForm.numStatus = numStatus
-      //点击驳回重新审核时,调用其他接口
-      
-        await this.$refs.ruleForm.validate(async (valid) => {
-          if (valid) {
-            this.$emit("searchChange", this.ruleForm);
-          } else {
-            console.log("error submit!!");
-            return false;
-          }
-        });
-      
-      
-    },
-  },
-};
-</script>
-
-<style>
-</style>

+ 199 - 508
src/views/goodStore/goodsOnline/components/fixed-price-form.vue → src/views/goodStore/goodsOnline/components/online-form.vue

@@ -1,307 +1,11 @@
 <template>
   <div v-loading="loading">
-    <!-- {{ sitem.is_gold_price }} -->
-    <el-form
-      :model="addrForm"
-      ref="addrForm"
-      status-icon
-      class="demo-addrForm-goodsOnline"
-      :size="'mini'"
-    >
-      <el-table
-        :data="addrForm.good_ladder"
-        :size="'mini'"
-        border
-        stripe
-        max-height="300px"
-        row-key="key"
-        style="width: 100%; margin: 0 0 20px 0"
-      >
-        <el-table-column type="index" width="50" show-overflow-tooltip />
-        <el-table-column prop="min_num" label="起订量(>=)" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'min_num'"
-              :rules="addrRules.min_num"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <digital-input
-                :values="scope.row.min_num"
-                :placeholder="'起订量(>=)'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="0"
-                :controls="false"
-                :append="''"
-                :newTime="scope.row.newTime"
-                :size="'mini'"
-                :disabled="!scope.row.edit"
-                @reschange="num_change($event, 'min_num', scope.$index)"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.min_num }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="new_sale_price" show-overflow-tooltip>
-          <template slot="header" slot-scope="scope">
-            <span>系统售价</span>
-            <!-- <el-popover
-              placement="top-start"
-              title="计算公式:"
-              width="300"
-              style="margin: 3px 0 0 0"
-              class="fr"
-              trigger="hover"
-              ><div>
-                <div v-if="sitem.is_gold_price === '1'">
-                  <span class="jiashu">贵金属克重</span>
-                  <span class="jiahao">*</span>
-                  <span class="jiashu">实时金价</span>
-                  <span class="jiahao">+</span>
-                  <span class="jiashu">工艺费</span>
-                  <span class="jiahao">*</span>
-                  <span class="jiashu">贵金属克重</span>
-                  <span class="jiahao">+</span>
-                </div>
-                <div>
-                  <span class="jiashu">包装费</span>
-                  <span class="jiahao">+</span>
-                  <span class="jiashu">裸价</span>
-                  <span class="jiahao">+</span>
-                  <span class="jiashu">加标费</span>
-                  <span class="jiahao">+</span>
-                  <span class="jiashu">证书费</span>
-                  <span class="jiahao">+</span>
-                  <span class="jiashu">物流费</span>
-                </div>
-              </div>
-
-              <i class="el-icon-question tb-icon" slot="reference"></i>
-            </el-popover> -->
-          </template>
-
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'new_sale_price'"
-              :rules="addrRules.new_sale_price"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <el-input
-                v-loading="scope.row.loading"
-                v-model="scope.row.new_sale_price"
-                placeholder="系统售价"
-                :disabled="true"
-                :size="'mini'"
-                maxlength="20"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.new_sale_price }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="sale_price"
-          label="售价"
-          show-overflow-tooltip
-          v-if="!(sitem && sitem.is_gold_price + '' === '1' && is_noble)"
-        >
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'sale_price'"
-              :rules="addrRules.sale_price"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <digital-input
-                :values="scope.row.sale_price"
-                :placeholder="'售价'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :controls="false"
-                :append="''"
-                :newTime="scope.row.newTime"
-                :size="'mini'"
-                :disabled="!scope.row.edit"
-                @reschange="num_change($event, 'sale_price', scope.$index)"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.sale_price }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="new_cost_fee"
-          show-overflow-
-          v-if="sitem && sitem.is_gold_price + '' === '1' && is_noble"
-          label="系统工艺费"
-        >
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'new_cost_fee'"
-              :rules="addrRules.new_cost_fee"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <el-input
-                v-loading="scope.row.loading"
-                v-model="scope.row.new_cost_fee"
-                placeholder="工艺费"
-                :disabled="true"
-                :size="'mini'"
-                maxlength="20"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.new_cost_fee }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="cost_fee"
-          label="工艺费"
-          show-overflow-tooltip
-          v-if="sitem && sitem.is_gold_price === '1' && is_noble"
-        >
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'cost_fee'"
-              :rules="addrRules.cost_fee"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <digital-input
-                :values="scope.row.cost_fee"
-                :placeholder="'工艺费'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :controls="false"
-                :append="''"
-                :newTime="scope.row.newTime"
-                :size="'mini'"
-                :disabled="!scope.row.edit"
-                @reschange="num_change($event, 'cost_fee', scope.$index)"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.cost_fee }}</span>
-          </template>
-        </el-table-column>
-
-        <el-table-column prop="market_price" label="市场价" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'market_price'"
-              :rules="addrRules.market_price"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <digital-input
-                :values="scope.row.market_price"
-                :placeholder="'市场价'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :controls="false"
-                :append="''"
-                :newTime="scope.row.newTime"
-                :size="'mini'"
-                :disabled="!scope.row.edit"
-                @reschange="num_change($event, 'market_price', scope.$index)"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.market_price }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="market_platform" label="对比平台" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'market_platform'"
-              :rules="addrRules.market_platform"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <el-input
-                v-model="scope.row.market_platform"
-                placeholder="对比平台"
-                maxlength="50"
-                :disabled="!scope.row.edit"
-              />
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{ scope.row.market_platform }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="status" label="状态" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <el-form-item
-              v-show="scope.row.edit"
-              :prop="'good_ladder.' + scope.$index + '.' + 'status'"
-              :rules="addrRules.status"
-              :size="'mini'"
-              :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-            >
-              <el-select v-model="scope.row.status" placeholder="状态">
-                <el-option
-                  v-for="item in status_options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <span v-show="!scope.row.edit">{{
-              scope.row.status == "1" ? "启用" : "禁用"
-            }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column fixed="right">
-          <template slot="header" slot-scope="scope">
-            <span>操作</span>
-            <el-tooltip effect="dark" content="添加阶梯" placement="top">
-              <i
-                class="el-icon-circle-plus-outline tb-icon fr"
-                @click="openCostEdit(-1)"
-              ></i>
-            </el-tooltip>
-          </template>
-          <template slot-scope="scope">
-            <el-tooltip
-              effect="dark"
-              content="保存"
-              v-if="scope.row.edit"
-              placement="top"
-            >
-              <i class="el-icon-circle-check tb-icon" @click="checkRow(scope.$index)"></i>
-            </el-tooltip>
-            <el-tooltip effect="dark" v-else content="修改" placement="top">
-              <i class="el-icon-edit tb-icon" @click="openCostEdit(scope.$index)"></i>
-            </el-tooltip>
-            <el-tooltip effect="dark" content="删除" placement="top">
-              <i
-                class="el-icon-delete tb-icon"
-                @click="openCostEditDelete(scope.$index)"
-              ></i>
-            </el-tooltip>
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-form>
     <el-form
       ref="ruleForm"
       :model="ruleForm"
       status-icon
       :rules="rulesThis"
-      :label-position="'left'"
+      label-width="115px"
       class="demo-ruleForm-goodsOnline"
       :size="'mini'"
     >
@@ -319,30 +23,26 @@
               }}</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item label="审核备注" prop="remark">
-            <!-- v-if="ruleForm.state === '0'" -->
+          <el-form-item
+            label="平台商品编码"
+            v-if="ruleForm.state + '' === '1'"
+            prop="plat_code"
+          >
             <el-input
-              type="textarea"
-              placeholder="审核备注"
-              v-model="ruleForm.remark"
+              placeholder="平台商品编码"
+              v-model="ruleForm.plat_code"
               :disabled="disabled"
-              maxlength="250"
-              show-word-limit
-              :autosize="{ minRows: 3, maxRows: 3 }"
-            />
-          </el-form-item>
+              maxlength="100"
+          /></el-form-item>
         </el-col>
 
-        <el-col :span="12" v-if="ruleForm.state + '' === '1'"
-          ><el-form-item label="售价凭证类型" prop="proof_type">
-            <el-radio-group v-model="ruleForm.proof_type" @change="set_proof_url()">
+        <el-col :span="12" v-if="ruleForm.state + '' === '1'">
+          <el-form-item label="售价凭证类型" prop="proof_type">
+            <el-radio-group v-model="ruleForm.proof_type">
               <el-radio v-for="item in options" :key="item.value" :label="item.value">{{
                 item.label
               }}</el-radio>
             </el-radio-group>
-            <el-button class="fr" type="primary" @click="showVoucher = true"
-              >查看历史凭证</el-button
-            >
           </el-form-item>
           <el-form-item label="凭证文件" prop="proof_url">
             <ul class="shangchuan-ul">
@@ -360,12 +60,19 @@
                       slot="reference"
                     ></i>
                   </el-popover>
-                  <el-link
-                    :underline="false"
-                    @click="deleteUrl('1')"
-                    type="warning"
+
+                  <el-button
+                    type="text"
                     style="margin: 0 0 0 16px"
-                    >删除</el-link
+                    @click="deleteUrl('1')"
+                    icon="el-icon-close"
+                  ></el-button>
+                  <el-button
+                    class="fr"
+                    type="text"
+                    @click="showVoucher = true"
+                    icon="el-icon-view"
+                    >历史凭证</el-button
                   >
                 </div>
 
@@ -392,16 +99,23 @@
               <li v-if="ruleForm.proof_type + '' === '2'" class="tupian">
                 <div v-if="img_url" class="clearfix">
                   <img
-                    style="width: 50px; height: 50px"
+                    style="width: 28px; height: 28px"
                     :src="img_url"
-                    class="avatar fl"
+                    class="avatar fl hover"
+                    v-viewer
                   />
-                  <el-link
-                    :underline="false"
-                    @click="deleteUrl('2')"
-                    type="warning"
+                  <el-button
+                    type="text"
                     style="margin: 0 0 0 16px"
-                    >删除</el-link
+                    @click="deleteUrl('2')"
+                    icon="el-icon-close"
+                  ></el-button>
+                  <el-button
+                    class="fr"
+                    type="text"
+                    @click="showVoucher = true"
+                    icon="el-icon-view"
+                    >历史凭证</el-button
                   >
                 </div>
 
@@ -428,12 +142,18 @@
                 <div v-if="other_url" class="clearfix">
                   <a :href="other_url" download="凭证文件">点击下载</a>
 
-                  <el-link
-                    :underline="false"
-                    @click="deleteUrl('3')"
-                    type="warning"
+                  <el-button
+                    type="text"
                     style="margin: 0 0 0 16px"
-                    >删除</el-link
+                    @click="deleteUrl('3')"
+                    icon="el-icon-close"
+                  ></el-button>
+                  <el-button
+                    class="fr"
+                    type="text"
+                    @click="showVoucher = true"
+                    icon="el-icon-view"
+                    >历史凭证</el-button
                   >
                 </div>
 
@@ -464,23 +184,88 @@
             @searchChange="resvoucher"
           />
         </el-col>
-
         <el-col :span="24">
-          <el-form-item class="fr">
-            <el-button
-              v-if="!isDetail && ruleForm.state !== '1'"
-              :size="'mini'"
-              type="primary"
-              @click="rejectRe('')"
-              >驳回重新审核
-            </el-button>
-            <el-button v-if="!isDetail" :size="'mini'" type="primary" @click="submitForm"
-              >保 存
-            </el-button>
+          <el-form-item label="审核备注" prop="remark">
+            <el-input
+              type="textarea"
+              placeholder="审核备注"
+              v-model="ruleForm.remark"
+              :disabled="disabled"
+              maxlength="250"
+              show-word-limit
+              :autosize="{ minRows: 3, maxRows: 3 }"
+            />
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
+    <el-form
+      v-if="ruleForm.state + '' === '1'"
+      :model="addrForm"
+      ref="addrForm"
+      status-icon
+      class="demo-addrForm-goodsOnline"
+      :size="'mini'"
+    >
+      <el-table
+        :data="addrForm.good_ladder"
+        :size="'mini'"
+        border
+        stripe
+        max-height="300px"
+        row-key="key"
+        style="width: 100%; margin: 0 0 20px 0"
+      >
+        <el-table-column type="index" label="行数" width="100" show-overflow-tooltip />
+        <el-table-column prop="min_num" label="起订量(>=)" show-overflow-tooltip />
+        <el-table-column
+          prop="new_sale_price"
+          v-if="!(sitem && sitem.is_gold_price + '' === '1' && is_noble)"
+          label="系统售价"
+          show-overflow-tooltip
+        />
+
+        <el-table-column
+          prop="new_cost_fee"
+          show-overflow-tooltip
+          v-if="sitem && sitem.is_gold_price + '' === '1' && is_noble"
+          label="系统工艺费"
+        />
+
+        <el-table-column prop="market_price" label="市场价" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <digital-input
+              :values="scope.row.market_price"
+              :placeholder="'市场价'"
+              :min="0"
+              :max="100000000000"
+              :position="'right'"
+              :precision="2"
+              :controls="false"
+              :append="''"
+              :newTime="scope.row.newTime"
+              :size="'mini'"
+              @reschange="num_change($event, 'market_price', scope.$index)"
+            />
+          </template>
+        </el-table-column>
+        <el-table-column prop="market_platform" label="对比平台" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input
+              v-model="scope.row.market_platform"
+              placeholder="对比平台"
+              maxlength="50"
+              :size="'mini'"
+            />
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-form>
+    <div class="tr">
+      <el-button v-if="!isDetail" :size="'mini'" type="primary" @click="submitForm"
+        >保 存
+      </el-button>
+    </div>
   </div>
 </template>
 
@@ -545,6 +330,7 @@ export default {
     };
     return {
       loading: false,
+      companyNo: "",
       platform_id: "",
       stateList: [
         {
@@ -597,6 +383,7 @@ export default {
       ruleForm: {
         skuCode: "",
         numStatus: "",
+        plat_code: "",
         state: "1", //通过or驳回
         proof_type: "1", //
         proof_url: "", //驳回至
@@ -632,6 +419,13 @@ export default {
             trigger: "change",
           },
         ],
+        plat_code: [
+          {
+            required: true,
+            message: "请输入平台商品编号",
+            trigger: "blur",
+          },
+        ],
         remark: [
           { required: true, message: "请输入审核备注", trigger: "blur" },
           {
@@ -647,33 +441,6 @@ export default {
       },
       good_ladder: [],
       addrRules: {
-        min_num: [
-          {
-            required: true,
-            validator: validate_num_0,
-            trigger: "blur",
-          },
-        ],
-        new_sale_price: [{ required: false }],
-        sale_price: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validate_num,
-          },
-        ],
-        cost_fee: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validate_num,
-          },
-        ],
-        new_cost_fee: [
-          {
-            required: false,
-          },
-        ],
         market_price: [
           {
             required: true,
@@ -689,13 +456,6 @@ export default {
             trigger: "blur",
           },
         ],
-        status: [
-          {
-            required: true,
-            message: "状态不能为空",
-            trigger: "change",
-          },
-        ],
       },
     };
   },
@@ -716,21 +476,7 @@ export default {
     this.initForm();
   },
   methods: {
-    // 点击驳回重新审核或驳回并下线按钮
-    async rejectRe(numStatus) {
-      this.ruleForm.numStatus = numStatus;
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          console.log(valid);
-          this.$emit("searchChange", this.ruleForm);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
     async initForm() {
-      console.log(this.spuCode);
       this.loading = true;
       await this.resetForm();
       this.rulesThis = this.rules;
@@ -747,37 +493,16 @@ export default {
       }
     },
 
-    openCostEdit(index) {
-      let findex = this.addrForm.good_ladder.findIndex((v) => v.edit === true);
-      if (findex !== -1) {
-        this.$message.warning("当前已有阶梯售价在编辑,请保存后再试!");
-        return;
-      } else {
-        if (index === -1) {
-          this.addrForm.good_ladder.push({
-            edit: true,
-            min_num: "0",
-            new_sale_price: "0",
-            new_cost_fee: "0",
-            sale_price: "0",
-            cost_fee: "0",
-            market_price: "0",
-            market_platform: "",
-            status: "1",
-          });
-        } else {
-          this.addrForm.good_ladder[index].edit = true;
-          this.addrForm.good_ladder[index].newTime = new Date().valueOf() + "";
-        }
-      }
-    },
     async get_new(index) {
       const { min_num } = this.addrForm.good_ladder[index];
       this.addrForm.good_ladder[index].search_loading = true;
+      console.log(this.companyNo);
       let { code, data, message } = await asyncRequest.goodupprice({
         min_num: min_num,
         spuCode: this.spuCode,
         platform_id: this.platform_id,
+        relaComNo: this.companyNo,
+        needRela: true,
       });
       let resModel = {
         isok: code,
@@ -788,41 +513,7 @@ export default {
       this.addrForm.good_ladder[index].search_loading = false;
       return resModel;
     },
-    //保存某一行
-    async checkRow(rowIndex) {
-      await this.$refs.addrForm.validate(async (valid) => {
-        if (valid) {
-          if (!this.addrForm.good_ladder[rowIndex].search_loading) {
-            const { min_num } = this.addrForm.good_ladder[rowIndex];
-            let findex = this.addrForm.good_ladder.findIndex(
-              (v) => v.edit !== true && v.min_num + "" === min_num + ""
-            );
-            if (findex !== -1) {
-              this.$message.warning("当前已有相同起订量的销售价!");
-              return;
-            }
-            let { isok, price, message, new_cost_fee } = await this.get_new(rowIndex);
-            if (isok === 0) {
-              this.addrForm.good_ladder[rowIndex].new_sale_price = price;
-              this.addrForm.good_ladder[rowIndex].new_cost_fee = new_cost_fee;
-              this.addrForm.good_ladder[rowIndex].edit = false;
-            } else if (isok >= 100 && isok <= 104) {
-              await this.logout();
-            } else {
-              this.addrForm.good_ladder[rowIndex].new_sale_price = price;
-              this.addrForm.good_ladder[rowIndex].new_cost_fee = new_cost_fee;
-              this.$message.warning(message);
-            }
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    openCostEditDelete(index) {
-      this.addrForm.good_ladder.splice(index, 1);
-    },
+
     async num_change(e, key, index) {
       const resNum = e ?? "";
       this.addrForm.good_ladder[index][key] = resNum === "" ? "0" : resNum;
@@ -834,13 +525,11 @@ export default {
           if (!this.addrForm.good_ladder[index].search_loading) {
             let { isok, price, message, new_cost_fee } = await this.get_new(index);
             if (isok === 0) {
-              this.addrForm.good_ladder[index].new_sale_price = price;
-              this.addrForm.good_ladder[index].new_cost_fee = new_cost_fee;
+              this.set_ladder_item(index, price, new_cost_fee);
             } else if (isok >= 100 && isok <= 104) {
               await this.logout();
             } else {
-              this.addrForm.good_ladder[index].new_sale_price = price;
-              this.addrForm.good_ladder[index].new_cost_fee = new_cost_fee;
+              this.set_ladder_item(index, price, new_cost_fee);
               this.$message.warning(message);
             }
           }
@@ -857,7 +546,14 @@ export default {
           this.$refs.ruleForm.clearValidate();
           this.$refs.addrForm.resetFields();
           this.$refs.addrForm.clearValidate();
-          let { proof, ladderlist, cat_info, platform_id } = this.sitem;
+          let {
+            proof,
+            nakelist,
+            ladderlist,
+            cat_info,
+            platform_id,
+            companyNo,
+          } = this.sitem;
           // console.log(platform_id);
           this.platform_id = platform_id;
           if (cat_info && cat_info.length > 0) {
@@ -867,12 +563,21 @@ export default {
               }
             });
           }
-          ladderlist.map((a) => {
-            a.search_loading = false;
-            a.new_sale_price = "0";
-            a.newTime = new Date().valueOf() + "";
-            a.edit = false;
-            return a;
+          this.companyNo = companyNo;
+          let listAll = [];
+          // nakelist.forEach((e) => {
+          //   listAll.push({ min_num: e.min_num });
+          // });
+          let index = -1;
+          nakelist.forEach((e, ei) => {
+            index = ladderlist.findIndex((s) => Number(s.min_num) === Number(e.min_num));
+            listAll.push({
+              id: index != -1 ? ladderlist[index].id : "",
+              min_num: index != -1 ? ladderlist[index].min_num : e.min_num,
+              market_price: index != -1 ? ladderlist[index].market_price : "",
+              market_platform: index != -1 ? ladderlist[index].market_platform : "",
+              newTime: new Date().valueOf() + "",
+            });
           });
 
           this.ruleForm = {
@@ -883,56 +588,51 @@ export default {
             proof_type: proof && proof.proof_type ? proof.proof_type : "1", // 通过or驳回
             proof_url: proof && proof.proof_url ? proof.proof_url : "", //驳回至
           };
+          this.good_ladder =
+            listAll && listAll.length > 0 ? JSON.parse(JSON.stringify(listAll)) : [];
           this.addrForm = {
             good_ladder:
-              ladderlist && ladderlist.length > 0
-                ? JSON.parse(JSON.stringify(ladderlist))
-                : [],
+              listAll && listAll.length > 0 ? JSON.parse(JSON.stringify(listAll)) : [],
           };
-          this.good_ladder =
-            ladderlist && ladderlist.length > 0
-              ? JSON.parse(JSON.stringify(ladderlist))
-              : [];
-          // console.log(this.ruleForm.proof_url);
-          switch (this.ruleForm.proof_type) {
-            case "1":
-              this.video_url = this.ruleForm.proof_url;
-              break;
-            case "2":
-              this.img_url = this.ruleForm.proof_url;
-              break;
-            case "3":
-              this.other_url = this.ruleForm.proof_url;
-              break;
-            default:
-              this.video_url = this.ruleForm.proof_url;
-          }
-          this.$refs.ruleForm.validateField("proof_url");
+
+          this.set_file_url(this.ruleForm.proof_type, this.ruleForm.proof_url);
           for (let i = 0; i < this.addrForm.good_ladder.length; i++) {
             let { isok, price, new_cost_fee, message } = await this.get_new(i);
             if (isok === 0) {
-              this.addrForm.good_ladder[i].new_sale_price = price;
-              this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
-              this.addrForm.good_ladder[i].edit = false;
+              this.set_ladder_item(i, price, new_cost_fee);
             } else if (isok >= 100 && isok <= 104) {
               await this.logout();
             } else {
-              this.addrForm.good_ladder[i].new_sale_price = price;
-              this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
-              this.addrForm.good_ladder[i].edit = true;
-              this.addrForm.good_ladder[i].newTime = new Date().valueOf() + "";
+              this.set_ladder_item(i, price, new_cost_fee);
               this.$message.warning(message);
             }
           }
         }
       });
     },
+    set_file_url(type, url) {
+      switch (type) {
+        case "1":
+          this.video_url = url;
+          break;
+        case "2":
+          this.img_url = url;
+          break;
+        case "3":
+          this.other_url = url;
+          break;
+        default:
+          this.video_url = url;
+      }
+      this.$refs.ruleForm.validateField("proof_url");
+    },
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           if (!this.loading) {
             let model = JSON.parse(JSON.stringify(this.ruleForm));
             const { state } = model;
+            console.log(state);
             if (state + "" === "1") {
               this.loading = true;
               if (this.addrForm.good_ladder.length === 0) {
@@ -941,34 +641,18 @@ export default {
                 return;
               }
               let list = JSON.parse(JSON.stringify(this.addrForm.good_ladder));
-              let isedit = false;
-              list.forEach((v) => {
-                if (v.edit) {
-                  isedit = true;
-                }
-              });
-              if (isedit) {
-                this.$message.warning("请保存阶梯售价!");
-                this.loading = false;
-                return;
-              }
 
               let all_is_ok = true;
               for (let i = 0; i < this.addrForm.good_ladder; i++) {
                 this.addrForm.good_ladder[i].search_loading = true;
                 let { isok, price, new_cost_fee } = await this.get_new(i);
                 if (isok === 0) {
-                  this.addrForm.good_ladder[i].new_sale_price = price;
-                  this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
-                  this.addrForm.good_ladder[i].this.addrForm.good_ladder[i].edit = false;
+                  this.set_ladder_item(i, price, new_cost_fee);
                 } else if (isok >= 100 && isok <= 104) {
                   await this.logout();
                 } else {
                   all_is_ok = false;
-                  this.addrForm.good_ladder[i].new_sale_price = price;
-                  this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
-                  this.addrForm.good_ladder[i].edit = true;
-                  this.addrForm.good_ladder[i].newTime = new Date().valueOf() + "";
+                  this.set_ladder_item(i, price, new_cost_fee);
                 }
               }
               if (!all_is_ok) {
@@ -997,7 +681,7 @@ export default {
               model.exam_remark = model.remark;
               delete model["remark"];
             } else {
-              model.numStatus = "7";
+              model.numStatus = "4";
               this.$emit("rejectRes", model);
             }
           }
@@ -1007,7 +691,14 @@ export default {
         }
       });
     },
+    set_ladder_item(i, price, new_cost_fee) {
+      this.addrForm.good_ladder[i].new_sale_price = price;
+      this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
+      this.addrForm.good_ladder[i].newTime = new Date().valueOf() + Math.random();
+      this.$set(this.addrForm.good_ladder, i, this.addrForm.good_ladder[i]);
+    },
     async successHttp(model) {
+      console.log(model);
       const { code, message } = await asyncRequest.ladderOne(model);
       this.loading = false;
       if (code === 0) {

+ 9 - 67
src/views/goodStore/goodsOnline/detail.vue

@@ -106,6 +106,10 @@
                 <template slot="exam_status">
                   <el-tag
                     :size="'mini'"
+                    :type="
+                      (options8.find((item) => item.id == sitem.exam_status) || {})
+                        .type || ''
+                    "
                     v-text="
                       (options8.find((item) => item.id == sitem.exam_status) || {})
                         .name || '--'
@@ -229,38 +233,15 @@
                     <el-table-column prop="market_platform" label="对比平台" />
                     <el-table-column prop="status" label="状态">
                       <template slot-scope="scope">{{
-                        scope.row.status + '' === "1" ? "启用" : "禁用"
+                        scope.row.status + "" === "1" ? "启用" : "禁用"
                       }}</template>
                     </el-table-column>
                   </el-table>
                 </template>
               </show-data-table>
             </el-collapse-item>
-            <el-collapse-item
-              title="产品部门审批"
-              name="1"
-              v-if="
-                status + '' === '2' && ppowers.some((i) => i == '2') && queryType == 'view'
-              "
-            >
-              <online-exam-form
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :time="sitem.online_time"
-                :disabled="false"
-                :isMust="false"
-                :statusList="[]"
-                @searchChange="examForm"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="财务定价"
-              name="2"
-              v-if="
-                status + '' === '3' && ppowers.some((i) => i == '3') && queryType == 'view'
-              "
-            >
-              <fixed-price-form
+            <el-collapse-item title="商品上线(新)" name="1">
+              <online-form
                 :newTime="newTime"
                 :id="queryId"
                 :spuCode="spuCode"
@@ -273,39 +254,6 @@
                 @rejectRes="examForm2"
               />
             </el-collapse-item>
-            <el-collapse-item
-              title="财务审核定价"
-              name="3"
-              v-if="
-                status + '' === '4' && ppowers.some((i) => i == '4') && queryType == 'view'
-              "
-            >
-              <examFormNew
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :options8="options8"
-                :disabled="false"
-                :isMust="false"
-                @searchChange="examForm2"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="操作商品上线"
-              name="4"
-              v-if="
-                status + '' === '5' && ppowers.some((i) => i == '5') && queryType == 'view'
-              "
-            >
-              <handle-online-form
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :options="[]"
-                :code="sitem.plat_code"
-                :disabled="false"
-                :isMust="false"
-                @resSuccess="examForm3"
-              />
-            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="2">
@@ -337,10 +285,6 @@ import asyncRequest from "@/apis/service/goodStore/goodsOnline";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import { public_listCol, purchase_listCol, sale_listCol } from "./ShowDataTableColumns";
-import onlineExamForm from "./components/online-exam-form";
-import fixedPriceForm from "./components/fixed-price-form";
-import handleOnlineForm from "./components/handle-online-form";
-import examFormNew from "./components/exam-form/main.vue";
 import processRemarkTimeLine from "./components/process-remark-time-line";
 import {
   options1,
@@ -353,14 +297,12 @@ import {
   options8,
 } from "./columns";
 import { isArray } from "@/utils/validate";
+import onlineForm from "./components/online-form";
 export default {
   name: "goodsOnlineDetail",
   mixins: [resToken],
   components: {
-    onlineExamForm,
-    fixedPriceForm,
-    handleOnlineForm,
-    examFormNew,
+    onlineForm,
     processRemarkTimeLine,
   },
   computed: {

+ 11 - 16
src/views/goodStore/goodsOnline/index.vue

@@ -2,7 +2,7 @@
   <div class="goodsOnline pagePadding">
     <ex-table
       v-loading="loading"
-      v-if=" powers.some((i) => i == '001')"
+      v-if="powers.some((i) => i == '001')"
       :table="table"
       :data="tableData"
       :columns="columns"
@@ -158,9 +158,7 @@
                   <el-option label="平台商品编号" value="6" />
                   <el-option label="成本创建人" value="7" />
                   <el-option label="上线创建人" value="10" />
-                  <el-option label="上线创建人部门" value="9" />
-                  
-                  </el-select
+                  <el-option label="上线创建人部门" value="9" /> </el-select
               ></el-input>
             </el-col>
             <el-col
@@ -214,9 +212,7 @@
       <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
-          :type="
-            scope.row.status == '6' ? '' : scope.row.status == '7' ? 'danger' : 'warning'
-          "
+          :type="(options8.find((item) => item.id == scope.row.status) || {}).type || ''"
           v-text="
             (options8.find((item) => item.id == scope.row.status) || {}).name || '--'
           "
@@ -247,7 +243,7 @@
         <el-tooltip
           v-if="
             powers.some((i) => i == '078') &&
-            (scope.row.status + '' === '7' || scope.row.status + '' === '8')
+            (scope.row.status + '' === '4' || scope.row.status + '' === '5')
           "
           effect="dark"
           content="重新发起上线流程"
@@ -259,7 +255,7 @@
           ></i>
         </el-tooltip>
         <el-tooltip
-          v-if="powers.some((i) => i == '079') && scope.row.status !== '8'"
+          v-if="powers.some((i) => i == '079') && scope.row.status !== '5'"
           effect="dark"
           content="下线商品"
           placement="top"
@@ -383,7 +379,7 @@ import { mapGetters } from "vuex";
 import urlConfig from "@/apis/url-config";
 import resToken from "@/mixins/resToken";
 import { listCol, options1, options8 } from "./columns";
-import companyHelper from "@/mixins/companyHelper"
+import companyHelper from "@/mixins/companyHelper";
 
 export default {
   name: "goodsOnline",
@@ -393,8 +389,7 @@ export default {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find((i) => i.menu_route == "goodsOnline") ||
-        {};
+        this.$store.getters.btnList.find((i) => i.menu_route == "goodsOnline") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
@@ -787,7 +782,7 @@ export default {
           this.loading = true;
           let obj = {
             skuCode: skuCode,
-            exam_status: "8",
+            exam_status: "5",
           };
           let model = { ...this.donline_form, ...obj };
           // console.log("aaaaa", model);
@@ -817,7 +812,7 @@ export default {
      * @param {String} status 0-禁用 1-启用
      */
     async changeStatus(id, status) {
-      await this.$confirm(`确定要改为${status + '' === "1" ? "禁用" : "启用"}?`, {
+      await this.$confirm(`确定要改为${status + "" === "1" ? "禁用" : "启用"}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -826,7 +821,7 @@ export default {
           this.loading = true;
           const model = {
             id: id,
-            status: status + '' === "1" ? "0" : "1",
+            status: status + "" === "1" ? "0" : "1",
           };
           const res = await asyncRequest.status(model);
           if (res && res.code === 0) {
@@ -886,7 +881,7 @@ export default {
       this.loading = true;
       let model = JSON.parse(JSON.stringify(this.parmValue));
 
-      model.companyNo = this.currentCompany || ""
+      model.companyNo = this.currentCompany || "";
 
       model.good_name = this.select === "1" ? this.sinput : ""; //商品名称
 

+ 25 - 0
src/views/purchaseIn/purchaseOrder/columns.js

@@ -46,6 +46,31 @@ const columns = [
   //   label: "仓库名称",
   //   width: "80px",
   // },
+  {
+    prop: 'status',
+    label: '状态',
+    _slot_: 'status',
+    width: '120px'
+  },
+  {
+    prop: 'order_source',
+    label: '订单来源',
+    _slot_: 'order_source',
+    width: '110px'
+  },
+  {
+    prop: 'order_id',
+    label: '商品类型',
+    _slot_: 'order_id',
+    width: '110px'
+  },
+
+  {
+    prop: 'has_account',
+    label: '供应商端情况',
+    _slot_: 'has_account',
+    width: '100px'
+  },
   {
     prop: 'spuCode',
     label: '商品成本编号',

+ 56 - 36
src/views/purchaseIn/purchaseOrder/index.vue

@@ -10,7 +10,7 @@
         :size="size"
         @page-curr-change="handlePageChange"
         @page-size-change="handleSizeChange"
-        @selection-change="list => tableSelection = list"
+        @selection-change="(list) => (tableSelection = list)"
         @screen-reset="
           pageInfo.curr = 1;
           parmValue.page = 1;
@@ -100,7 +100,7 @@
               </el-col>
             </el-row>
             <el-row style="padding: 10px 0 0 0">
-              <el-col :span="4" style="width: 130px; margin-right:10px">
+              <el-col :span="4" style="width: 130px; margin-right: 10px">
                 <el-select
                   :size="searchSize"
                   v-model="parmValue.order_type"
@@ -123,7 +123,7 @@
                 </el-select>
               </el-col>
 
-            <el-col :span="4" style="width: 130px; margin-right:10px">
+              <el-col :span="4" style="width: 130px; margin-right: 10px">
                 <el-select
                   :size="searchSize"
                   v-model="parmValue.order_source"
@@ -144,10 +144,10 @@
                     :value="item.id"
                   />
                 </el-select>
-            </el-col>
-            
-            <el-col :span="4">
-              <search-supplier
+              </el-col>
+
+              <el-col :span="4">
+                <search-supplier
                   :size="'mini'"
                   style="width: 220px"
                   :value="supplierNo"
@@ -158,8 +158,7 @@
                   :noDisabled="true"
                   @searchChange="supplierChange"
                 />
-            </el-col>
-
+              </el-col>
 
               <el-col :span="4" style="width: 66px; float: right">
                 <el-button
@@ -188,10 +187,7 @@
                 </el-button>
               </el-col>
 
-              <el-col
-               :span="4"
-               style="width: 66px; float: right"
-              >
+              <el-col :span="4" style="width: 66px; float: right">
                 <el-button
                   type="primary"
                   @click="handleBatchIn"
@@ -202,7 +198,6 @@
                 </el-button>
               </el-col>
             </el-row>
-          
 
             <el-row>
               <el-col :span="6" style="width: 500px; margin-top: 10px">
@@ -283,6 +278,25 @@
             "
           ></el-tag>
         </template>
+        <template #has_account="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="
+              (
+                has_account_list.find(
+                  (item) => item.code == scope.row.has_account + ''
+                ) || {}
+              ).type || '--'
+            "
+            v-text="
+              (
+                has_account_list.find(
+                  (item) => item.code == scope.row.has_account + ''
+                ) || {}
+              ).name || '--'
+            "
+          ></el-tag>
+        </template>
         <template #order_id="{ scope }">
           <el-tag
             :size="tablebtnSize"
@@ -299,8 +313,9 @@
             :size="tablebtnSize"
             v-text="
               (
-                cg_order_source_options.find((item) => item.id == scope.row.order_source) ||
-                {}
+                cg_order_source_options.find(
+                  (item) => item.id == scope.row.order_source
+                ) || {}
               ).label || '--'
             "
           ></el-tag>
@@ -331,7 +346,11 @@ import resToken from "@/mixins/resToken";
 import urlConfig from "@/apis/url-config";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
 import { columns, statusOptions } from "./columns";
-import { cg_order_type_options, cg_order_source_options } from "@/assets/js/statusList";
+import {
+  cg_order_type_options,
+  cg_order_source_options,
+  has_account_list,
+} from "@/assets/js/statusList";
 import companyHelper from "@/mixins/companyHelper";
 import { mapGetters } from "vuex";
 
@@ -352,13 +371,14 @@ export default {
   data() {
     return {
       is_stock: [
-        { id: '0', name: '非库存品' },
-        { id: '1', name: '库存品' }
+        { id: "0", name: "非库存品" },
+        { id: "1", name: "库存品" },
       ],
       supplierNo: [],
       tableSelection: [],
       //入库公司
       supplierName: "",
+      has_account_list,
       cg_order_type_options,
       cg_order_source_options,
       //入库仓库
@@ -466,47 +486,47 @@ export default {
   },
 
   methods: {
-    async handleBatchIn(){
-      if(this.tableSelection.length === 0){
+    async handleBatchIn() {
+      if (this.tableSelection.length === 0) {
         this.$message.warning("请选择至少一条采购单");
-        return
+        return;
       }
 
-      for(let i = 0; i < this.tableSelection.length; i++){
+      for (let i = 0; i < this.tableSelection.length; i++) {
         const item = this.tableSelection[i];
 
-        if(item.status !== "1" && item.status !== "2"){
+        if (item.status !== "1" && item.status !== "2") {
           this.$message.warning("只能选择未入库的销售订单!");
-          return 
+          return;
         }
 
-        if(item.order_type === "1"){
+        if (item.order_type === "1") {
           this.$message.warning("选择的采购单中不能包含库存品");
-           return
+          return;
         }
 
-        if(item.can && item.can[0].id === 6){
+        if (item.can && item.can[0].id === 6) {
           this.$message.warning("选择的采购单中不能包含贵金属");
-          return
+          return;
         }
       }
 
-      const cgdNo = this.tableSelection.map(item => item.cgdNo)
-      const { code, message } = await asyncRequest.orderBatchIn({cgdNo})
+      const cgdNo = this.tableSelection.map((item) => item.cgdNo);
+      const { code, message } = await asyncRequest.orderBatchIn({ cgdNo });
 
-      switch(code){
+      switch (code) {
         case 0:
           this.searchList();
           break;
         default:
           this.$message.warning(message);
-          break
+          break;
       }
     },
     async supplierChange(e) {
       const { code, label } = e;
       this.supplierNo = code ? [code] : [];
-      this.searchList()
+      this.searchList();
     },
     getRouter(toRouter, queryId) {
       if (toRouter && queryId) {
@@ -802,8 +822,8 @@ export default {
 
       const res = await asyncRequest.list({
         ...this.parmValue,
-        supplierNo:Array.isArray(this.supplierNo) ? this.supplierNo[0] : this.supplierNo,
-        needRela: true
+        supplierNo: Array.isArray(this.supplierNo) ? this.supplierNo[0] : this.supplierNo,
+        needRela: true,
       });
 
       if (res && res.code === 0 && res.data) {

+ 14 - 12
src/views/purchaseIn/wsmInOrder/columns.js

@@ -22,6 +22,19 @@ export default [
     _slot_: 'status',
     width: '110px'
   },
+  {
+    prop: 'order_source',
+    label: '订单来源',
+    _slot_: 'order_source',
+    width: '118px'
+  },
+  {
+    prop: 'order_type',
+    label: '商品类型',
+    _slot_: 'order_type',
+    width: '118px'
+  },
+
   // {
   //   prop: "bkcode",
   //   label: "备库单编号",
@@ -76,18 +89,7 @@ export default [
     width: '100px'
   },
 
-  {
-    prop: 'order_type',
-    label: '商品类型',
-    _slot_: 'order_type',
-    width: '130px'
-  },
-  {
-    prop: 'order_source',
-    label: '订单来源',
-    _slot_: 'order_source',
-    width: '130px'
-  },
+ 
   // {
   //   prop: "wsm_num",
   //   label: "入库数量",

+ 0 - 358
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-record-form.vue

@@ -1,358 +0,0 @@
-<template>
-  <div v-loading="loading">
-    <el-row>
-      <el-col :span="4">
-        <el-form
-          :model="ruleForm"
-          :rules="rulesThis"
-          status-icon
-          :size="'mini'"
-          ref="ruleForm"
-          label-width="80px"
-          class="demo-ruleForm"
-        >
-          <el-form-item label="发货总数">
-            <el-input
-              placeholder="发货总数"
-              disabled
-              v-model="ruleForm.send_num"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-          <el-form-item label="正常数量" prop="wsm_num">
-            <digital-input
-              :values="ruleForm.wsm_num"
-              :placeholder="'正常数量'"
-              :min="0"
-              :disabled="!(status + '' === '1' && ppowers.some((i) => i == '1'))"
-              :max="ruleForm.send_num"
-              :position="'right'"
-              :precision="0"
-              :size="'mini'"
-              :controls="false"
-              :append="''"
-              @reschange="number_change($event, 'wsm_num')"
-            />
-          </el-form-item>
-        </el-form>
-      </el-col>
-      <el-col :span="20" style="padding: 0 0 0 10px">
-        <wsm-in-order-error-model
-          :showModel="showModel"
-          :id="modelId"
-          :sitem="modelitem"
-          :allnum="modelAllnum"
-          @refresh="errorModel"
-          @cancel="showModel = false"
-        />
-        <el-form
-          :model="tableForm"
-          :rules="tableRules"
-          ref="tableForm"
-          class="demo-tableForm"
-        >
-          <el-table :data="tableForm.error_list" border :size="'mini'" row-key="key">
-            <template v-for="(item, index) in columns">
-              <el-table-column
-                :prop="item.prop"
-                show-overflow-tooltip
-                :label="item.label"
-                v-if="item.prop !== 'error_img'"
-                :key="item.prop + index"
-              />
-              <el-table-column
-                :prop="item.prop"
-                :label="item.label"
-                v-if="item.prop === 'error_img'"
-                :key="item.prop + index"
-                width="350px"
-              >
-                <template slot-scope="scope">
-                  <ul class="el-table-column-error_img-ul clear">
-                    <li
-                      v-for="item in scope.row.error_img"
-                      :key="item"
-                      v-viewer
-                      class="hover"
-                    >
-                      <img :src="item" alt="" />
-                    </li>
-                  </ul>
-                </template>
-              </el-table-column>
-            </template>
-            <el-table-column
-              fixed="right"
-              width="80"
-              v-if="status + '' === '1' && ppowers.some((i) => i == '1')"
-            >
-              <template slot="header" slot-scope="scope">
-                <span>操作</span>
-                <el-tooltip
-                  class="fr"
-                  style="margin: 3px 0 0 0"
-                  effect="dark"
-                  content="添加"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-circle-plus-outline tb-icon"
-                    style="color: #6954f0"
-                    @click="addError(-1)"
-                  ></i>
-                </el-tooltip>
-              </template>
-              <template slot-scope="scope">
-                <el-tooltip effect="dark" content="编辑" placement="top">
-                  <i class="el-icon-edit tb-icon" @click="addError(scope.$index)"></i>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-form>
-      </el-col>
-      <el-col :span="24" style="text-align: right; padding: 10px 0">
-        <el-button
-          type="primary"
-          :size="'mini'"
-          v-if="status + '' === '1' && ppowers.some((i) => i == '1')"
-          @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-<script>
-import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
-import resToken from "@/mixins/resToken";
-import { isnumber } from "@/utils/validate";
-import wsmInOrderErrorModel from "./wsm-in-order-error-model";
-export default {
-  name: "wsmInOrderAdd",
-  props: ["id", "sitem", "newTime", "modelSitem"],
-  components: { wsmInOrderErrorModel },
-  mixins: [resToken],
-  computed: {
-    powers() {
-      const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "wsmInOrderDetail") || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-    ppowers() {
-      const tran =
-        this.$store.getters.roleProcess.find((i) => i.process_type === "RKD") || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-  },
-  data() {
-    const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
-      } else {
-        if (!isnumber(value)) {
-          callback(new Error("仅支持整数!"));
-        } else {
-          callback();
-        }
-      }
-    };
-
-    return {
-      loading: true,
-      rulesThis: this.rules,
-      status: "",
-      showModel: false,
-      modelAllnum: "",
-      modelitem: null,
-      modelId: "",
-      ruleForm: {
-        wsm_num: "",
-      },
-      rules: {
-        wsm_num: {
-          required: true,
-          validator: validateWeight,
-          trigger: "blur",
-        },
-      },
-      columns: [
-        {
-          prop: "num",
-          label: "异常数量",
-        },
-        {
-          prop: "error_msg",
-          label: "异常原因",
-        },
-        {
-          prop: "error_img",
-          label: "异常图片",
-        },
-        {
-          prop: "remark",
-          label: "异常备注",
-        },
-      ],
-      tableForm: {
-        error_list: [],
-      },
-      tableRules: {},
-    };
-  },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
-    },
-    errorModel(e) {
-      if (e) {
-        let index = e.index;
-        if (index === -1) {
-          this.tableForm.error_list.push(e);
-        } else {
-          this.$set(this.tableForm.error_list, index, e);
-        }
-      }
-    },
-    //初始化表单
-    async resetForm() {
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { send_num, wsm_num, status } = this.sitem;
-          this.status = status;
-          this.ruleForm = {
-            send_num: send_num || "",
-            wsm_num: wsm_num || "",
-          };
-        }
-        if (this.$refs.tableForm) {
-          this.$refs.tableForm.resetFields();
-          this.$refs.tableForm.clearValidate();
-
-          const { checkinfo } = this.sitem;
-          checkinfo.map((v) => {
-            v.error_img = v.error_img.split(",");
-          });
-          this.tableForm = {
-            error_list: checkinfo || [],
-          };
-        }
-      });
-    },
-    async number_change(e, key) {
-      this.ruleForm[key] = e + "" || "0";
-      this.$refs.ruleForm.validateField(key);
-    },
-    addError(index) {
-      this.modelAllnum = "2";
-      this.modelitem = index === -1 ? {} : this.tableForm.error_list[index];
-      this.modelId = index;
-      this.showModel = true;
-    },
-
-    // 保存更改
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          if (this.loading) {
-            return;
-          }
-          this.loading = true;
-          const item = JSON.parse(JSON.stringify(this.ruleForm));
-          let snum = parseInt(item.send_num),
-            wnum = parseInt(item.wsm_num),
-            errornum = 0,
-            list = [];
-
-          if (snum === wnum && this.tableForm.error_list.length > 0) {
-            this.$message.warning("正常数量与发货数量一致,无需填写异常原因!");
-            this.loading = false;
-            return;
-          }
-          this.tableForm.error_list.forEach((v) => {
-            errornum += parseInt(v.num);
-            let model = {
-              num: v.num,
-              error_code: v.error_code,
-              error_img: v.error_img.join(","),
-              remark: v.remark,
-            };
-            list.push(model);
-          });
-          console.log(errornum, wnum, snum);
-
-          if (errornum + wnum !== snum) {
-            this.$message.warning("异常数量总数与发货总数不一致!");
-            this.loading = false;
-            return;
-          }
-          let pitem = {
-            wsm_in_code: this.id,
-            order_num: wnum + "",
-            error_list: list,
-          };
-          const res = await asyncRequest.orderincheck(pitem);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "添加成功",
-              message: "",
-            });
-            this.$emit("refresh"); //抛出事件给详情页。
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.stockInDetail {
-  .el-table-column-error_img-ul {
-    position: relative;
-    box-sizing: border-box;
-    li {
-      float: left;
-      // border: 1px solid #dfe6ec;
-      margin: 0px 2px 0 0px;
-      box-sizing: border-box;
-      img {
-        display: inline-block;
-        box-sizing: border-box;
-        width: 20px;
-        vertical-align: top;
-        height: 20px;
-        &:hover {
-          cursor: pointer;
-        }
-      }
-    }
-  }
-}
-</style>

+ 0 - 246
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-return-form.vue

@@ -1,246 +0,0 @@
-<template>
-  <el-form
-    v-loading="loading"
-    :model="ruleForm"
-    :rules="rules"
-    status-icon
-    :size="'mini'"
-    ref="ruleForm"
-    label-width="90px"
-    class="demo-ruleForm"
-  >
-    <el-row>
-      <el-col :span="6">
-        <el-form-item label="退货总数" prop="wsm_num">
-          <el-input
-            placeholder="发货总数"
-            disabled
-            v-model="ruleForm.return_num"
-            maxlength="100"
-          >
-          </el-input>
-        </el-form-item>
-      </el-col>
-      <el-col :span="6">
-        <el-form-item label="物流公司" prop="post_company">
-          <search-express
-            :disabled="!(status + '' === '5' && ppowers.some((i) => i == '5'))"
-            :value="ruleForm.post_company"
-            :placeholder="'物流公司'"
-            :order_source="'0'"
-            :names="''"
-            :size="'mini'"
-            :is-detail="false"
-            @searchChange="handleCompany"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="10">
-        <el-form-item label="物流单号" prop="post_code">
-          <el-input
-            placeholder="物流单号"
-            :disabled="!(status + '' === '5' && ppowers.some((i) => i == '5'))"
-            v-model="ruleForm.post_code"
-            maxlength="100"
-          >
-          </el-input>
-        </el-form-item>
-      </el-col>
-      <el-col :span="2" style="text-align: right">
-        <el-button
-          type="primary"
-          v-if="status + '' === '5' && ppowers.some((i) => i == '5')"
-          :size="'mini'"
-          @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-<script>
-import asyncRequest from "@/apis/service/purchaseIn/wsmInOrder";
-import resToken from "@/mixins/resToken";
-import { isnumber, isAlphanumeric } from "@/utils/validate";
-export default {
-  name: "wsmInOrderAdd",
-  props: ["id", "sitem", "newTime", "modelSitem"],
-  mixins: [resToken],
-  computed: {
-    powers() {
-      const tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "wsmInOrderDetail"
-        ) || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-    ppowers() {
-      const tran =
-        this.$store.getters.roleProcess.find((i) => i.process_type === "RKD") || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-  },
-  data() {
-    const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
-      } else {
-        if (!isnumber(value)) {
-          callback(new Error("仅支持整数!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    const validateCode = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
-      } else {
-        if (!isAlphanumeric(value)) {
-          callback(new Error("仅支持字母和数字!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: true,
-      status: "",
-      showModel: false,
-      modelAllnum: "",
-      modelitem: null,
-      modelId: "",
-      ruleForm: {
-        return_num: "",
-        post_company: [],
-        post_code: "",
-      },
-      rules: {
-        return_num: {
-          required: true,
-          validator: validateWeight,
-          trigger: "blur",
-        },
-        post_company: {
-          required: true,
-          message: "请选择物流公司",
-          trigger: "change",
-        },
-        post_code: {
-          required: true,
-          validator: validateCode,
-          trigger: "blur",
-        },
-      },
-    };
-  },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-
-      await this.resetForm();
-      this.loading = false;
-    },
-    errorModel(e) {
-      if (e) {
-        let index = e.index;
-        if (index === -1) {
-          this.tableForm.error_list.push(e);
-        } else {
-          this.tableForm.error_list[index] = e;
-        }
-      }
-    },
-    //初始化表单
-    async resetForm() {
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { wsm_in_code, status } = this.sitem;
-          const { return_num, post_code, post_company } = this.sitem.return;
-          this.status = status;
-          this.ruleForm = {
-            wsm_in_code: wsm_in_code || "",
-            return_num: return_num || "0",
-            post_company: post_company ? [post_company] : [],
-            post_code: post_code || "",
-          };
-        }
-      });
-    },
-    handleCompany(e) {
-      const { code, label } = e;
-      this.ruleForm.post_company = code ? [label] : [];
-      this.$refs.ruleForm.validateField("post_company");
-    },
-    // 保存更改
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          if (this.loading) {
-            return;
-          }
-          this.loading = true;
-          let item = JSON.parse(JSON.stringify(this.ruleForm));
-          item.post_company = item.post_company.toString();
-          delete item["return_num"];
-          const res = await asyncRequest.returnsend(item);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "提交成功",
-              message: "",
-            });
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.stockInDetail {
-  .el-table-column-error_img-ul {
-    position: relative;
-    box-sizing: border-box;
-    li {
-      float: left;
-      border: 1px solid #dfe6ec;
-      margin: 0px 2px 2px 0px;
-      box-sizing: border-box;
-      img {
-        display: inline-block;
-        box-sizing: border-box;
-        width: 50px;
-        vertical-align: top;
-        height: 32px;
-        &:hover {
-          cursor: pointer;
-        }
-      }
-    }
-  }
-}
-</style>

+ 7 - 67
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-check-form.vue → src/views/purchaseIn/wsmInOrder/components/wsm-in.vue

@@ -10,10 +10,10 @@
       class="demo-ruleForm"
     >
       <el-row>
-        <el-col :span="6">
-          <el-form-item label="发货总数">
+        <el-col :span="8">
+          <el-form-item label="计划入库总数">
             <el-input
-              placeholder="发货总数"
+              placeholder="计划入库总数"
               disabled
               v-model="ruleForm.send_num"
               maxlength="100"
@@ -21,10 +21,10 @@
             </el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label="正常入库数量" prop="wsm_num">
+        <el-col :span="8">
+          <el-form-item label="实际总数量" prop="wsm_num">
             <el-input
-              placeholder="正常入库数量"
+              placeholder="实际总数量"
               :disabled="status + '' !== '2'"
               v-model="ruleForm.wsm_num"
               maxlength="100"
@@ -32,68 +32,8 @@
             </el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label="异常补发数量" prop="reissue_num">
-            <el-input
-              placeholder="异常补发数量"
-              :disabled="status + '' !== '2'"
-              v-model="ruleForm.reissue_num"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
-          <el-form-item label="异常退货数量" prop="return_num">
-            <el-input
-              placeholder="异常退货数量"
-              :disabled="status + '' !== '2'"
-              v-model="ruleForm.return_num"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
-          <el-form-item label="收件联系人" prop="contactor">
-            <el-input
-              placeholder="收件联系人"
-              :disabled="status + '' !== '2'"
-              v-model="ruleForm.contactor"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-          <el-form-item label="收件联系电话" prop="mobile">
-            <el-input
-              placeholder="收件联系电话"
-              :disabled="status + '' !== '2'"
-              v-model="ruleForm.mobile"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-        </el-col>
 
-        <el-col :span="18">
-          <el-form-item label="收件地址" prop="addr">
-            <el-input
-              placeholder="收件地址"
-              :disabled="status + '' !== '2'"
-              v-model="ruleForm.addr"
-              maxlength="250"
-            />
-          </el-form-item>
-          <el-form-item label="审核备注" prop="error_remark">
-            <el-input
-              placeholder="审核备注"
-              :disabled="status + '' !== '2'"
-              v-model="ruleForm.error_remark"
-              maxlength="250"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="24" style="text-align: right; padding: 0 0 10px 0">
+        <el-col :span="8" style="text-align: right; padding: 0 0 10px 0">
           <el-button
             :size="'mini'"
             v-if="status + '' === '2' && ppowers.some((i) => i == '2')"

+ 15 - 78
src/views/purchaseIn/wsmInOrder/detail.vue

@@ -4,12 +4,6 @@
       <!-- <div class="detail-page-title">
         <span class="title">入库单编号:{{ queryId }}</span>
       </div> -->
-      <!-- <status-bar
-        v-if="newTime !== ''"
-        :newTime="newTime"
-        :options="statusOptions"
-        :status="status"
-      /> -->
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
@@ -70,9 +64,9 @@
                 </template>
                 <template slot="sendtype">
                   <span>{{
-                    sitem.sendtype + '' == "1"
+                    sitem.sendtype + "" == "1"
                       ? "公司自提"
-                      : sitem.sendtype + '' === "2"
+                      : sitem.sendtype + "" === "2"
                       ? "供应商包邮"
                       : "--"
                   }}</span></template
@@ -89,63 +83,9 @@
                 :iscgd="true"
               />
             </el-collapse-item>
-            <el-collapse-item
-              title="入库验收登记"
-              name="3"
-              v-if="(sitem && sitem.sendtype + '' === '1') && !isSupertube"
-            >
-              <wsm-in-order-record-form
-                v-if="newTime !== ''"
-                :id="queryId"
-                :newTime="newTime"
-                :sitem="sitem"
-                @refresh="initData()"
-              />
-            </el-collapse-item>
-
-            <el-collapse-item
-              title="入库验收登记审核"
-              name="4"
-              v-if="(sitem && sitem.sendtype + '' === '1' && status + '' !== '0' && status + '' !== '1') && !isSupertube"
-            >
-              <wsm-in-order-check-form
-                v-if="newTime !== ''"
-                :id="queryId"
-                :newTime="newTime"
-                :modelSitem="{}"
-                :sitem="sitem"
-                @refresh="initData()"
-              />
-            </el-collapse-item>
 
-            <el-collapse-item
-              title="入库审核"
-              name="5"
-              v-if="
-                (
-                  status == '3' &&
-                  ppowers.some((i) => i == '3') &&
-                  sitem &&
-                  sitem.sendtype + '' === '1'
-                ) && !isSupertube
-              "
-            >
-              <exam-form
-                :statusList="statusList"
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :disabled="false"
-                :isMust="false"
-                @searchChange="examForm"
-              />
-            </el-collapse-item>
-
-            <el-collapse-item
-              title="入库退货"
-              name="6"
-              v-if="(status == '5' && ppowers.some((i) => i == '5') && sitem.sendtype + '' === '1') && !isSupertube"
-            >
-              <wsm-in-order-return-form
+            <el-collapse-item title="入库验收" name="3">
+              <wsm-in
                 v-if="newTime !== ''"
                 :id="queryId"
                 :newTime="newTime"
@@ -173,9 +113,9 @@
           <logis-time-line v-if="newTime !== ''" :orderCode="sitem.post_code" />
         </el-tab-pane>
 
-        <el-tab-pane label="流程图" name="4"  v-if="sitem.sendtype !== '2'">
+        <el-tab-pane label="流程图" name="4" v-if="sitem.sendtype !== '2'">
           <flow-chart process_id="2" type="RKD" :orderCode="queryId" />
-       </el-tab-pane>
+        </el-tab-pane>
       </el-tabs>
     </div>
     <div v-else>
@@ -186,30 +126,26 @@
 <script>
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
-import wsmInOrderRecordForm from "./components/wsm-in-order-record-form";
-import wsmInOrderCheckForm from "./components/wsm-in-order-check-form";
-import wsmInOrderReturnForm from "./components/wsm-in-order-return-form";
+import wsmIn from "./components/wsm-in";
 import ShowDataTableColumns from "./components/ShowDataTableColumns";
 import { cg_order_type_options } from "@/assets/js/statusList";
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
 export default {
   name: "wsmInOrderDetail",
   mixins: [resToken],
   components: {
-    wsmInOrderRecordForm,
-    wsmInOrderCheckForm,
-    wsmInOrderReturnForm,
+    wsmIn,
   },
   computed: {
-    ...mapGetters([ 'isSupertube' ]),
+    ...mapGetters(["isSupertube"]),
     powers() {
-      const { btnList } = this.$store.getters
-      const tran = btnList.find((item) => item.menu_route == "wsmInOrderDetail" ) || {};
+      const { btnList } = this.$store.getters;
+      const tran = btnList.find((item) => item.menu_route == "wsmInOrderDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     ppowers() {
-      const { roleProcess } = this.$store.getters
+      const { roleProcess } = this.$store.getters;
       const tran = roleProcess.find((i) => i.process_type === "RKD") || {};
       const { action } = tran ?? {};
       return action ?? [];
@@ -315,7 +251,8 @@ export default {
     },
     async examForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? (this.sitem.return_num + '' === "0" ? "4" : "5") : "2";
+        let type =
+          e.state + "" === "1" ? (this.sitem.return_num + "" === "0" ? "4" : "5") : "2";
         await this.setStatus(type, "提交入库方审核", e.remark);
       }
     },

+ 6 - 13
src/views/sellOut/bargainList/columns.js

@@ -59,19 +59,12 @@ const options12 = [
   { id: '1', name: '多地' }
 ]
 const statusList = [
-  { id: '0', label: '待业务主管审核', type: 'warning' },
-  { id: '1', label: '业务主管通过', type: 'success' },
-  { id: '2', label: '待财务专员审批', type: 'warning' },
-  { id: '3', label: '业务主管驳回', type: 'danger' },
-  { id: '4', label: '待财务主管审核', type: 'warning' },
-  // { id: "5", label: "专员驳回", type: "" },
-  { id: '6', label: '财务主管通过', type: 'success' },
-  { id: '7', label: '待BOSS审批', type: 'warning' },
-  { id: '8', label: '财务主管驳回', type: 'danger' },
-  { id: '9', label: 'boss通过', type: 'success' },
-  { id: '10', label: 'boss越线通过', type: '' },
-  { id: '11', label: 'boss驳回', type: 'danger' },
-  { id: '12', label: '取消议价', type: 'info' } // 已选完商品,取消议价
+  { id: '0', label: '待业务主管审核', type: '' },
+  { id: '1', label: '业务主管已通过', type: 'success' },
+  { id: '2', label: '业务主管已驳回', type: 'danger' },
+  { id: '3', label: '业务主管越线通过', type: 'warning' },
+  { id: '4', label: '取消议价', type: 'info' } 
+  // 已选完商品,取消议价
 ]
 const editColumns = [
   {

+ 7 - 54
src/views/sellOut/bargainList/detail.vue

@@ -113,7 +113,8 @@
               name="2"
               v-if="
                 (eaxmList.some((item) => item.info_status + '' == '0') ||
-                (status == '0' && ppowers.some((i) => i == '0'))) && !isSupertube
+                  (status == '0' && ppowers.some((i) => i == '0'))) &&
+                !isSupertube
               "
             >
               <exam-formss
@@ -121,55 +122,7 @@
                 v-if="newTime !== ''"
                 :disabled="!(status == '0' && ppowers.some((i) => i == '0'))"
                 :sitem="orderItem"
-                @searchChange="examFormSubmit($event, '业务部门')"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="财务专员审批"
-              name="3"
-              v-if="
-                (eaxmList.some((item) => item.info_status + '' == '2') ||
-                (status == '2' && ppowers.some((i) => i == '2'))) && !isSupertube
-              "
-            >
-              <exam-formss
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :disabled="!(status == '2' && ppowers.some((i) => i == '2'))"
-                :sitem="moneyDirItem"
-                @searchChange="examFormSubmit($event, '财务专员')"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="财务主管审批"
-              name="4"
-              v-if="
-                (eaxmList.some((item) => item.info_status + '' == '4') ||
-                (status == '4' && ppowers.some((i) => i == '4'))) && !isSupertube
-              "
-            >
-              <exam-formss
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :disabled="!(status == '4' && ppowers.some((i) => i == '4'))"
-                :sitem="moneyItem"
-                @searchChange="examFormSubmit($event, '财务主管')"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="BOSS审批"
-              name="5"
-              v-if="
-                (eaxmList.some((item) => item.info_status + '' == '7') ||
-                (status == '7' && ppowers.some((i) => i == '7'))) && !isSupertube
-              "
-            >
-              <exam-formss
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :disabled="!(status == '7' && ppowers.some((i) => i == '7'))"
-                :sitem="BossItem"
-                @searchChange="examFormSubmit($event, 'BOSS')"
+                @searchChange="examFormSubmit($event, '业务主管')"
               />
             </el-collapse-item>
           </el-collapse>
@@ -227,8 +180,8 @@ export default {
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "isSupertube"]),
     powers() {
-      const { btnList } = this.$store.getters
-      const tran = btnList.find( (item) => item.menu_route == "bargainListDetail") || {};
+      const { btnList } = this.$store.getters;
+      const tran = btnList.find((item) => item.menu_route == "bargainListDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
@@ -365,9 +318,9 @@ export default {
           .then(async () => {
             const { after_price, lower_price } = this.sitem;
             if (
-              this.status + '' === "7" &&
+              this.status + "" === "7" &&
               after_price * 1 < lower_price * 1 &&
-              state + '' + "" === "1"
+              state + "" + "" === "1"
             ) {
               this.loading = false;
               await this.$confirm(

+ 5 - 6
src/views/youzan/othgoodsOnline/columns.js

@@ -36,12 +36,11 @@ const options7 = [
   { id: "1", name: "是" },
 ]
 const options8 = [
-  { id: "0", name: "待产品审核" },
-  { id: "1", name: "待执行上线" },
-  { id: "2", name: "审核驳回" },
-  { id: "6", name: "上线成功" },
-  { id: "7", name: "上线失败" },
-  { id: "8", name: "已下线" },
+  { id: "1", name: "待完善成本" },
+  { id: "2", name: "待产品审核" },
+  { id: "3", name: "上线成功" },
+  { id: "4", name: "上线已驳回" },
+  { id: "5", name: "商品已下线" },
 ]
 const listCol = [
   {

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels