Jelajahi Sumber

Merge branch 'dev' into sit

lucky 2 tahun lalu
induk
melakukan
3820674718

+ 5 - 0
src/App.vue

@@ -85,4 +85,9 @@ export default {
 </script>
 <style lang="scss">
 @import "./assets/css/index.scss";
+//因为element-ui的confim组件并不是vue生成的不具有[data-v....],所以全局注入一个class
+// .lzx_BtnErr{
+//   background: #f56c6c !important;
+//   color: #fff !important;
+// }
 </style>

+ 3 - 0
src/apis/service/goodStore/goodsCost/index.js

@@ -31,4 +31,7 @@ export default {
   // 取实时金价
   golpricelast: (data, params) => http(api + "golpricelast", data, "post", params),
 
+   //同一个spuCode下所有的商品都下线
+   goodupoffline: (data, params) => http(api + "goodupoffline", data, "post", params),
+
 };

+ 7 - 0
src/apis/service/goodStore/goodsOnline/index.js

@@ -39,4 +39,11 @@ export default {
   exportgood: (data, params) => http(api + "exportgood", data, "post", params),
 
 
+  //商品上线审核时、驳回重新审核
+
+  goodupreject: (data, params) => http(api + "goodupreject", data, "post", params),
+
+ 
+
+
 };

+ 1 - 1
src/views/goodStore/goodsCost/columns.js

@@ -123,7 +123,7 @@ const listCol = [
     label: "操作",
     fixed: "right",
     _noset_: true,
-    width: "170px",
+    width: "200px",
     _slot_: "operation",
   },
 ]

+ 57 - 0
src/views/goodStore/goodsCost/index.vue

@@ -244,6 +244,20 @@
             @click="getRouter('goodsCostDetail', scope.row.spuCode )"
           ></i>
         </el-tooltip>
+        <el-tooltip
+          v-if="
+            powers.some((item) => item == '079') && scope.row.status !== '8'
+          "
+          effect="dark"
+          content="下线商品"
+          placement="top"
+        >
+          <i
+            class="el-icon-download tb-icon"
+            @click="get_donline(scope.row.spuCode)"
+          ></i>
+          
+        </el-tooltip>
         <el-tooltip
           v-if="
             (powers.some((item) => item == '005') &&
@@ -791,6 +805,49 @@ export default {
       }
       this.showModel = true;
     },
+
+
+   async get_donline(spuCode){
+      await this.$confirm(`本次操作会下线本条SKU下的所有商品`, "提示",{
+        // cancelButtonClass:"lzx_BtnErr",
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      }).then(async()=>{
+        await this.$confirm(`确定要下线商品?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            spuCode: spuCode,
+     
+          };
+          const res = await asyncRequest.goodupoffline(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: res.message,
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消1");
+        });
+      }).catch(async()=>{
+        console.log("取消");
+      })
+    }
   },
 };
 </script>

+ 95 - 0
src/views/goodStore/goodsOffline/columns.js

@@ -0,0 +1,95 @@
+//未签收报表
+const table5 = [
+    // {
+    //   type: "expand",
+    //   _slot_: "expand",
+    //   fixed: "left",
+    //   _noset_: true,
+    // },
+    {
+      type: "selection",
+      fixed: "left",
+      _noset_: true
+    },
+    {
+      prop: "apply_name",
+      label: "创建人",
+      minWidth: "155px",
+    },
+    {
+      prop: "creater_company",
+      label: "创建人部门",
+      minWidth: "155px",
+    },
+    {
+      prop: "addtime",
+      label: "下单时间",
+      minWidth: "155px",
+    },
+  
+    {
+      prop: "orderCode",
+      label: "订单号",
+      minWidth: "155px",
+    },
+    {
+      prop: "first_customer_org",
+      label: "一级企业",
+      minWidth: "155px",
+    },
+    {
+      prop: "second_customer_org",
+      label: "二级企业",
+      minWidth: "155px",
+    },
+    {
+      prop: "companyName",
+      label: "客户名称",
+      minWidth: "155px",
+    },
+    {
+      prop: "good_name",
+      label: "产品名称",
+      minWidth: "155px",
+    },
+    {
+      prop: "good_num",
+      label: "数量",
+      minWidth: "155px",
+    },
+    {
+      prop: "unit",
+      label: "单位",
+      minWidth: "155px",
+    },
+    {
+      prop: "sale_price",
+      label: "单价",
+      minWidth: "155px",
+    },
+    {
+      prop: "total_price",
+      label: "金额",
+      minWidth: "155px",
+    },
+  
+    {
+      prop: "sendtime",
+      label: "发货时间",
+      minWidth: "155px",
+    },
+    {
+      prop: "",
+
+      label: "操作",
+      fixed: "right",
+      _noset_: true,
+      _slot_:'operation',
+      minWidth: "45px",
+
+    }
+  ]
+
+  export {
+    table5
+  }

+ 13 - 0
src/views/goodStore/goodsOffline/detail.vue

@@ -0,0 +1,13 @@
+<template>
+  <div>w(゚Д゚)w</div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+
+</style>

+ 327 - 0
src/views/goodStore/goodsOffline/index.vue

@@ -0,0 +1,327 @@
+<template>
+    <div>
+      <ex-table
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="table5"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @selection="selection_change"
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+             
+               <el-col :span="6" style="width: 363px;">
+                <periodDatePickerActive
+                      :start="parmValue.start_date"
+                      :end="parmValue.end_date"
+                      :placeholder="'下线'"
+                      :width="'165px'"
+                      :size="searchSize"
+                      @timeReturned="time"
+                    />
+              </el-col>  
+              <el-col :span="4" style="width: 66px; float: right">       
+                <el-button type="primary" style="margin-left:30px;" @click="download" :size="searchSize"  class="fr">
+                    导出
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>  
+            </el-row>
+          
+          </div>
+       </template>
+      <template #operation="{ scope }">
+        <el-tooltip
+          v-if="powers.some((item) => item == '007')"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <i
+            class="el-icon-view tb-icon"
+            @click="getRouter('goodsOfflineDetail', scope.row.orderCode)"
+          ></i>
+        </el-tooltip>
+    
+      </template>
+        
+      </ex-table>
+    </div>
+
+  
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import asyncRequest from "@/apis/service/reportQuery/saleReport";
+import periodDatePickerActive from "./period-date-picker/main.vue";
+import { table5} from "./columns";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "saleReport",
+  mixins: [mixinPage, resToken],
+  components: {
+    periodDatePickerActive
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find((item) => item.menu_route == "goodsOffline") ||
+        {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+    
+  },
+  data() {
+    return {
+      //选中数组
+      changeList: [],
+      //全局url
+      fileUrl: urlConfig.baseURL,
+      //loading
+      loading: false,
+      //请求参数集合
+      parmValue: {
+        
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
+        // is_export:0,//是否导出0/1
+
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+       
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格表头 - 列参数
+      table5: table5,
+    };
+  },
+  mounted() {
+    alert("此页面暂时只用做开发人员测试、数据不真实")
+    this.searchList();
+  },
+
+  methods: {
+    getRouter(toRouter, queryId){
+      if (toRouter && queryId) {
+        let model = {
+          id: queryId,
+          type: 'view',
+        };
+
+        //有多选框的条件
+        // this.parmValue.select = this.select ;
+        // this.parmValue.sselect = this.sselect ;
+        // this.parmValue.sinput= this.sinput;
+        //
+        // console.log(this.parmValue)
+         let routerModel = {
+          options: JSON.parse(JSON.stringify(this.parmValue)),
+          router: this.$route.path,
+        };
+        model.preModel = JSON.stringify(routerModel);
+        
+        this.routeGoto(toRouter, model);
+      } else {
+        this.$message.warning("暂未找到相关流程!");
+      }
+    },
+    //初始化http请求
+    async searchList() {
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.loading = true;
+      
+      const res = await asyncRequest.saleexportnotsigned(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message)
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+   
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
+        // is_export:0,//是否导出0/1
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+    
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_date = e.startTime || "";
+      this.parmValue.end_date = e.endTime || "";
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+
+     //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    //导出文件 
+    async download() {
+      // if(this.changeList.length<=0){
+      //   this.$message.warning("请选择有效数据")
+      //   return;
+      // }
+      let model = JSON.parse(JSON.stringify(this.parmValue))
+      // model.is_export = 1;
+      let start_date = new Date(this.parmValue.start_date).valueOf();
+      let end_date = new Date(this.parmValue.end_date).valueOf();
+      let flag = end_date - start_date > 30 * 24 * 60 * 60 * 1000;
+      if(this.parmValue.start_date != "" && this.parmValue.end_date != ""){
+        if(flag){
+          this.$message.warning("导出文件的时间区间不能超过30天")
+          return;
+        }
+      }else{
+        this.$message.warning("请选择导出文件的时间区间")
+        return;
+      }
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/saleexportnotsignedexport",
+          responseType: "blob",
+          data: model,
+          headers: {
+            // 'Content-Type': 'multipart/form-data',
+            // Accept: "application/vnd.ms-excel"
+            Accept: httpType,
+          },
+        })
+          .then((res) => {
+            // console.log(res)
+            // console.log(this.fileUrl)
+            // return;
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
+                  type: httpType
+                })
+              );
+              let link = document.createElement("a");
+              link.style.display = "none";
+              link.href = url;
+              let excelName = "未签收报表.zip";
+              link.setAttribute("download", excelName);
+              document.body.appendChild(link);
+              link.click();
+              link.remove();
+              window.URL.revokeObjectURL(url); //释放掉blob对象
+              this.$message.success(`导出成功!`);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            } else {
+              this.$message.error(res.data.message);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            }
+          })
+          .catch((error) => {
+            console.log(error);
+            this.loading = false;
+          });
+      }
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrder {
+  // text-align: right;
+}
+</style>
+   

+ 2 - 0
src/views/goodStore/goodsOffline/period-date-picker/index.js

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

+ 147 - 0
src/views/goodStore/goodsOffline/period-date-picker/main.vue

@@ -0,0 +1,147 @@
+<template>
+  <div class="fl time">
+    <el-date-picker
+      v-model="startTime"
+      style="margin: 0"
+      class="date-picker"
+      type="date"
+      :size="size"
+      :style="{ width: width }"
+      :placeholder="(placeholder||'') + '开始日期'"
+      value-format="yyyy-MM-dd"
+      :picker-options="pickerOptions1"
+      :editable="false"
+      :clearable="true"
+      :disabled="isEdit"
+      @change="timeChange"
+    />
+    <samp style="padding: 0 3px; margin: 0">至</samp>
+    <el-date-picker
+      style="margin: 0"
+      :size="size"
+      v-model="endTime"
+      class="date-picker"
+      :style="{ width: width }"
+      type="date"
+      :placeholder="(placeholder||'') + '结束日期'"
+      :disabled="isEdit"
+      :picker-options="pickerOptions2"
+      :editable="false"
+      value-format="yyyy-MM-dd"
+      :clearable="true"
+      @change="timeChange"
+    />
+  </div>
+</template>
+
+<script>
+// 选择时间段(只有日期)组件
+// timeReturned 返回值{startTime: Number,endTime: Number}
+export default {
+  name: "PeriodDatePicker",
+  props: ["start", "end", "disabled", "size", "width", "type", "placeholder"],
+  data() {
+    return {
+      startTime: this.start,
+      endTime: this.end,
+      isEdit: this.disabled,
+      pickerOptions1: {
+        disabledDate: (time) => {
+          if (this.endTime != null && this.endTime != "" && time) {
+            return time.getTime() > new Date(this.endTime).valueOf();
+          }
+        },
+      },
+      pickerOptions2: {
+        disabledDate: (time) => {
+          if (this.startTime != null && this.startTime != "" && time) {
+            return time.getTime() < new Date(this.startTime).valueOf();
+          }
+        },
+      },
+    };
+  },
+  watch: {
+    disabled: function (val) {
+      this.isEdit = val;
+    },
+    start(val) {
+      this.startTime = val;
+    },
+    end(val) {
+      this.endTime = val;
+    },
+  },
+  mounted() {},
+  methods: {
+    timeChange() {
+      if (
+        this.startTime !== "" &&
+        this.startTime !== null &&
+        this.endTime !== "" &&
+        this.endTime !== null
+      ) {
+        if (this.type + "" === "1" && !this.setType(365)) {
+          this.showMessage("时间跨度不能超过一年!");
+          return;
+        } else if (this.type + "" === "2" && !this.setType(90)) {
+          this.showMessage("时间跨度不能超过90天!");
+          return;
+        }else if (this.type + "" === "3" && !this.setType(30)) {
+          this.showMessage("时间跨度不能超过30天!");
+          return;
+        } else if (
+          new Date(this.endTime).valueOf() < new Date(this.startTime).valueOf()
+        ) {
+          this.showMessage("结束时间不大于开始时间!");
+          return;
+        } else {
+          this.timeReturned();
+        }
+      } else {
+        this.timeReturned();
+      }
+    },
+    timeReturned() {
+      let s = this.startTime == null ? "" : this.startTime;
+      let e = this.endTime == null ? "" : this.endTime;
+      let model = {
+        startTime: s == "" ? "" : this.transformTime(s),
+        endTime: e == "" ? "" : this.transformTime(e),
+      };
+
+      this.$emit("timeReturned", model);
+    },
+
+    transformTime(tTime) {
+      let time = new Date(tTime);
+      let y = time.getFullYear();
+      let M = time.getMonth() + 1;
+      let d = time.getDate();
+      return y + "-" + (M < 10 ? "0" + M : M) + "-" + (d < 10 ? "0" + d : d);
+    },
+    showMessage(message) {
+      this.$message.error(message);
+      this.startTime = "";
+      this.endTime = "";
+      this.timeReturned();
+    },
+    setType(days) {
+      let step = 24 * 3600 * 1000;
+      let sDay = new Date(this.startTime).valueOf();
+      let eDay = new Date(this.endTime).valueOf();
+      let isok = true;
+      if (eDay - sDay > step * days) {
+        isok = false;
+      }
+
+      return isok;
+    },
+  },
+};
+</script>
+<style lang="scss">
+.date-picker.el-input {
+  // width: 150px !important;
+}
+</style>

+ 0 - 0
src/views/goodStore/goodsOffline/period-date-picker/日期选择区间


+ 0 - 0
src/views/goodStore/goodsOffline/商品下线查询


+ 2 - 0
src/views/goodStore/goodsOnline/components/exam-form/index.js

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

+ 226 - 0
src/views/goodStore/goodsOnline/components/exam-form/main.vue

@@ -0,0 +1,226 @@
+<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="驳回节点"
+          v-if="ruleForm.state === '0' && isMust"
+          prop="rebut"
+        >
+          <el-select
+            v-model="ruleForm.rebut"
+            placeholder="请选择驳回节点"
+            style="width: 100%"
+            :disabled="disabled"
+          >
+            <el-option
+              v-for="item in statusList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+              :disabled="item.disabled"
+            >
+            </el-option>
+          </el-select>
+        </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"
+            :autosize="{ minRows: 3, maxRows: 3 }"
+            show-word-limit
+          />
+        </el-form-item>
+        <el-form-item class="fr" v-if="ruleForm.state === '1'">
+          <el-button
+            v-if="!isDetail"
+            :size="'mini'"
+            type="primary"
+            @click="submitForm('5')"
+            >保 存
+          </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"],
+  /**
+   * 属性集合
+   * @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,
+      ruleForm: {
+        state: "1", // 通过or驳回
+        numStatus:"",
+
+        rebut: "", //驳回至
+        remark: "",
+      },
+      rulesThis: this.rules,
+      rules: {
+        state: [
+          {
+            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;
+      }
+    },
+  },
+  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: "", //驳回至
+            numStatus:"",
+            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>

+ 0 - 0
src/views/goodStore/goodsOnline/components/exam-form/审核表单


+ 106 - 5
src/views/goodStore/goodsOnline/components/fixed-price-form.vue

@@ -325,7 +325,61 @@
       :size="'mini'"
     >
       <el-row>
-        <el-col :span="24"
+        <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">
+        <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 === '0'" >
+          <el-button
+            v-if="!isDetail"
+            :size="'mini'"
+            type="primary"
+            @click="rejectRe('')"
+            >驳回重新审核
+          </el-button>
+        </el-form-item>
+        <el-form-item class="fr" v-if="ruleForm.state === '0'" style="margin-right:30px;" >
+          <el-button
+            v-if="!isDetail"
+            :size="'mini'"
+            type="danger"
+            @click="rejectRe('8')"
+            >驳回并下线
+          </el-button>
+        </el-form-item>
+      </el-col>
+        <el-col :span="24" v-if="ruleForm.state === '1'"
           ><el-form-item label="售价凭证类型" prop="proof_type">
             <el-radio-group
               v-model="ruleForm.proof_type"
@@ -350,7 +404,7 @@
             @searchChange="resvoucher"
           />
         </el-col>
-        <el-col :span="18">
+        <el-col :span="18" v-if="ruleForm.state === '1'">
           <el-form-item label="凭证文件" prop="proof_url">
             <ul class="shangchuan-ul">
               <li v-if="ruleForm.proof_type === '1'" class="shiping">
@@ -465,7 +519,7 @@
             </ul>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
+        <el-col :span="6" v-if="ruleForm.state === '1'">
           <el-form-item class="fr">
             <el-button
               v-if="!isDetail"
@@ -542,6 +596,16 @@ export default {
     };
     return {
       loading: false,
+      stateList: [
+        {
+          value: "1",
+          label: "通过",
+        },
+        {
+          value: "0",
+          label: "驳回",
+        },
+      ],
       showVoucher: false,
       is_noble: false,
       video_url: "",
@@ -582,8 +646,11 @@ export default {
       costsitem: {},
       ruleForm: {
         skuCode: "",
-        proof_type: "1", // 通过or驳回
+        numStatus:"",
+        state:"1",//通过or驳回
+        proof_type: "1", // 
         proof_url: "", //驳回至
+        remark:"",
       },
       rulesThis: this.rules,
       rules: {
@@ -608,6 +675,13 @@ export default {
             trigger: "change",
           },
         ],
+        state: [
+          {
+            required: true,
+            message: "请选择审核状态",
+            trigger: "change",
+          },
+        ],
         remark: [
           { required: true, message: "请输入审核备注", trigger: "blur" },
           {
@@ -691,14 +765,38 @@ 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;
-
+      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;
+      }
+    },
+
 
     openCostEdit(index) {
       let findex = this.addrForm.good_ladder.findIndex((v) => v.edit === true);
@@ -830,6 +928,9 @@ export default {
 
           this.ruleForm = {
             skuCode: this.id,
+            state: "1", // 通过or驳回
+            remark:"",
+            numStatus:"",
             proof_type: proof && proof.proof_type ? proof.proof_type : "1", // 通过or驳回
             proof_url: proof && proof.proof_url ? proof.proof_url : "", //驳回至
           };

+ 96 - 7
src/views/goodStore/goodsOnline/components/handle-online-form.vue

@@ -11,7 +11,67 @@
   >
     <el-row>
       <el-col :span="12"
-        ><el-form-item label="平台商品编码" prop="plat_code">
+        ><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
+          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
+            :size="'mini'"
+            type="primary"
+            @click="submitForm('6')"
+            >保 存
+          </el-button>
+        </el-form-item>
+
+        <el-form-item class="fr" v-if="ruleForm.state === '0'" >
+          <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 :span="24"  v-if="ruleForm.state === '1'" 
+        ><el-form-item label="平台商品编码" prop="plat_code" >
           <el-input
             v-model="ruleForm.plat_code"
             placeholder="平台商品编码"
@@ -19,11 +79,8 @@
           ></el-input>
         </el-form-item>
       </el-col>
-      <el-col :span="12" class="tr">
-        <el-button :size="'mini'" type="primary" @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
+
+     
     </el-row>
   </el-form>
 </template>
@@ -60,6 +117,16 @@ export default {
    */
   data() {
     return {
+      stateList: [
+        {
+          value: "1",
+          label: "通过",
+        },
+        {
+          value: "0",
+          label: "驳回",
+        },
+      ],
       loading: false,
 
       showModelThis: this.showModel,
@@ -70,6 +137,8 @@ export default {
       },
 
       ruleForm: {
+        state: "1", // 通过or驳回
+        remark: "",
         plat_code: "",
       },
       rulesThis: this.rules,
@@ -80,6 +149,23 @@ export default {
             message: "平台商品编码不能为空",
             trigger: "blur",
           },
+          
+        ],
+        state: [
+          {
+            required: true,
+            message: "请选择审核状态",
+            trigger: "change",
+          },
+        ],
+         remark: [
+          { required: true, message: "请输入审核备注", trigger: "blur" },
+          {
+            min: 1,
+            max: 250,
+            message: "长度在 1 到 250 个字符",
+            trigger: "blur",
+          },
         ],
       },
     };
@@ -109,11 +195,14 @@ export default {
 
           this.ruleForm = {
             plat_code: this.code || "",
+            state: "1", // 通过or驳回
+            remark: "",
           };
         }
       });
     },
-    async submitForm() {
+    async submitForm(numStatus) {
+      this.ruleForm.numStatus = numStatus;
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           let model = JSON.parse(JSON.stringify(this.ruleForm));

+ 37 - 11
src/views/goodStore/goodsOnline/components/online-exam-form.vue

@@ -59,15 +59,34 @@
             :autosize="{ minRows: 3, maxRows: 3 }"
           />
         </el-form-item>
-        <el-form-item class="fr">
+        <el-form-item class="fr" v-if="ruleForm.state === '1'" >
           <el-button
             v-if="!isDetail"
             :size="'mini'"
             type="primary"
-            @click="submitForm"
+            @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>
@@ -110,6 +129,7 @@ export default {
         },
       },
       ruleForm: {
+        numStatus:"",//点击的按钮状态
         state: "1", // 通过or驳回
         rebut: "", //驳回至
         online_time: "",
@@ -138,6 +158,7 @@ export default {
             trigger: "change",
           },
         ],
+        
         remark: [
           { required: true, message: "请输入审核备注", trigger: "blur" },
           {
@@ -198,15 +219,20 @@ export default {
         }
       });
     },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.$emit("searchChange", this.ruleForm);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
+    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;
+          }
+        });
+      
+      
     },
   },
 };

+ 81 - 13
src/views/goodStore/goodsOnline/detail.vue

@@ -278,6 +278,7 @@
                 :disabled="false"
                 :isMust="false"
                 @resSuccess="initForm"
+                @searchChange="examForm1"
               />
             </el-collapse-item>
             <el-collapse-item
@@ -289,7 +290,7 @@
                 powers.some((item) => item == '059')
               "
             >
-              <exam-form
+              <examFormNew
                 :newTime="newTime"
                 v-if="newTime !== ''"
                 :options8="options8"
@@ -345,6 +346,7 @@ import {
 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 {
   options1,
@@ -356,7 +358,7 @@ import {
   options7,
   options8,
 } from "./columns";
-import { isArray } from '@/utils/validate';
+import { isArray } from "@/utils/validate";
 export default {
   name: "goodsOnlineDetail",
   mixins: [resToken],
@@ -364,6 +366,7 @@ export default {
     onlineExamForm,
     fixedPriceForm,
     handleOnlineForm,
+    examFormNew,
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field"]),
@@ -426,17 +429,52 @@ export default {
 
       this.loading = false;
     },
-    // 点击业务审核的保存按钮
+    // 点击业务审核的按钮
     async examForm(e) {
       console.log(e);
       if (!this.loading) {
         let model = {
           skuCode: this.queryId,
-          exam_status: e.state === "1" ? "3" : "7",
+          exam_status: e.numStatus,
           online_time: e.online_time,
           remark: e.remark,
         };
-        await this.setstatus("提交产品部门审核结果", model);
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+          
+        } else if (e.numStatus == "3") {
+          //点击保存
+          // return;
+          await this.setstatus("提交产品部门审核结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 点击财务定价的驳回按钮
+    async examForm1(e) {
+      if ((e.numStatus ?? "") == "") {
+        if (!this.loading) {
+          let model = {
+            skuCode: this.queryId,
+            exam_status: e.numStatus,
+            remark: e.remark,
+          };
+          await this.setstatus("驳回重新审核吗", model);
+        }
+      } else {
+        // return;
+        if (!this.loading) {
+          let model = {
+            skuCode: this.queryId,
+            exam_status: e.numStatus,
+            remark: e.remark,
+          };
+          await this.setstatus("驳回下线吗", model);
+        }
       }
     },
     // 财务审核的保存按钮
@@ -445,10 +483,21 @@ export default {
       if (!this.loading) {
         let model = {
           skuCode: this.queryId,
-          exam_status: e.state === "1" ? "5" : "7",
+          exam_status: e.numStatus,
           remark: e.remark,
         };
-        await this.setstatus("提交财务审核结果", model);
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+        } else if (e.numStatus == "5") {
+          //点击保存
+          // return;
+          await this.setstatus("提交财务审核结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
       }
     },
     // 操作上线的保存按钮
@@ -457,22 +506,41 @@ export default {
       if (!this.loading) {
         let model = {
           skuCode: this.queryId,
-          exam_status: "6",
+          exam_status:e.numStatus,
           plat_code: e.plat_code,
           remark: e.remark || "",
         };
-        await this.setstatus("提交商品上线结果", model);
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+
+        } else if (e.numStatus == "6") {
+          //点击保存
+          // return;
+          await this.setstatus("提交商品上线结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
       }
     },
 
     async setstatus(detail, model) {
+      
+
       await this.$confirm(`确定要${detail}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       })
         .then(async () => {
-          let res = await asyncRequest.status(model);
+          let res = null;
+          if(model.exam_status == ""){
+            res = await asyncRequest.goodupreject(model);
+          }else{
+            res = await asyncRequest.status(model);
+          }
           if (res && res.code === 0) {
             this.$notify.success({
               title: "提交成功!",
@@ -520,11 +588,11 @@ export default {
           });
         }
         this.sitem.cat = cat;
-        
-        if(!isArray(this.sitem.good_info_img)){
+
+        if (!isArray(this.sitem.good_info_img)) {
           this.sitem.good_info_img = this.sitem.good_info_img.split(",");
         }
-        
+
         this.status = exam_status;
         this.getNewTime();
       } else if (code >= 100 && code <= 104) {

+ 13 - 5
src/views/goodStore/goodsOnline/index.vue

@@ -282,10 +282,12 @@
             class="el-icon-download tb-icon"
             @click="get_donline(scope.row.skuCode)"
           ></i>
+          
         </el-tooltip>
       </template>
     </ex-table>
     <no-auth v-else></no-auth>
+    
     <el-dialog
       title="上线商品导出"
       :visible.sync="centerDialogVisible"
@@ -676,6 +678,7 @@ export default {
      * @param {String} status 0-禁用 1-启用
      */
     async get_againonline(skuCode) {
+      
       await this.$confirm(`确定要重新发起上线流程?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -706,12 +709,14 @@ export default {
         });
     },
     /**
-     * 商品下线
-     * @param {String} id id
-     * @param {String} status 0-禁用 1-启用
+     * 商品下线 
+     * @param {String} id id 
+     * @param {String} status 0-禁用 1-启用 
      */
     async get_donline(skuCode) {
-      await this.$confirm(`确定要下线商品?`, {
+
+      
+         await this.$confirm(`确定要下线商品?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -726,7 +731,7 @@ export default {
           if (res && res.code === 0) {
             this.loading = false;
             this.$notify.success({
-              title: "下线商品成功!",
+              title: res.message,
               message: "",
             });
             await this.searchList();
@@ -740,6 +745,8 @@ export default {
         .catch(() => {
           console.log("取消");
         });
+      
+     
     },
     /**
      * 启用/禁用
@@ -858,4 +865,5 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+
 </style>

+ 1 - 0
src/views/process/unRead/index.vue

@@ -284,6 +284,7 @@ export default {
       const { toRouter, queryId, id } = item;
       const { code, data, message } = await asyncRequest.detail({ id: id });
       if (code === 0) {
+        console.log(toRouter)
         this.getRouter(toRouter, queryId);
       } else if (code >= 100 && code <= 104) {
         await this.logout();

+ 2 - 0
src/views/serviceParam/Invoicing/index.vue

@@ -109,6 +109,7 @@
                     placeholder="关键字类型"
                   >
                     <el-option label="统一社会信用代码" value="invoice_code" />
+                    <el-option label="上线商品编号" value="companyNo"/>
                     <el-option label="联系方式" value="invoice_mobile" />
                     <el-option label="发票抬头" value="invoice_title" />
                     <el-option label="企业客户名称" value="companyName" />
@@ -475,6 +476,7 @@ export default {
       this.parmValue.companyName = "";
       this.parmValue.creater = "";
       this.parmValue.company_name = "";
+      this.parmValue.companyNo = "";
       this.parmValue[this.select] = this.sinput;
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {