戴艳蓉 3 years ago
parent
commit
75aff827ef

+ 9 - 9
src/App.vue

@@ -15,16 +15,16 @@ export default {
     };
   },
   async created() {
-    // let list1=''
-    // let list2=""
-    // const key=".",zhkey='xiaod',mmkey='223322'
-    // for(let i=0;i<500;i++){
-    //   list1+=`${i===0?'':key}${zhkey}${i+1}`
-    //   list2+=`${i===0?'':key}${mmkey}`
+    let list1=''
+    let list2=""
+    const key=".",zhkey='xiaod',mmkey='223322'
+    for(let i=0;i<500;i++){
+      list1+=`${i===0?'':key}${zhkey}${i+1}`
+      list2+=`${i===0?'':key}${mmkey}`
 
-    // }
-    // console.log(list1);
-    // console.log(list2);
+    }
+    console.log(list1);
+    console.log(list2);
     if (JudgeEnvironment() === "isDingDing") {
       await this.testing();
     } else {

+ 1 - 40
src/components/globalComponents/show-data-table/main.vue

@@ -72,44 +72,5 @@ export default {
 
 
 <style lang="scss" scoped>
-.show-data-table {
-  padding: 0 0 20px 0;
-  width: 100%;
-  box-sizing: border-box;
-  .purchaseOrderDetail-addForm {
-    border-top: 1px solid #ebeef5 !important;
-    border-left: 1px solid #ebeef5 !important;
-    width: 100%;
-    box-sizing: border-box;
-    .purchaseOrderDetail-addForm-el-col {
-      display: flex;
-      align-items: stretch;
-      //  width: 100%;
-      box-sizing: border-box;
-      //
-      border-right: 1px solid #ebeef5 !important;
-      .label {
-        width: 100px;
-        line-height: 35px;
-        text-align: right;
-        background: #fafafa !important;
-        font-weight: 400 !important;
-        color: #909399 !important;
-        font-size: 12px !important;
-        border-bottom: 1px solid #ebeef5 !important;
-        border-right: 1px solid #ebeef5 !important;
-      }
-      .name {
-        width: calc(100% - 100px);
-        text-align: left;
-        line-height: 23px;
-        font-size: 12px !important;
-        border-bottom: 1px solid #ebeef5 !important;
-        padding: 6px 0 6px 10px !important;
-        word-break: break-all !important;
-        color: #606266 !important;
-      }
-    }
-  }
-}
+
 </style>

+ 1 - 1
src/components/globalComponents/status-bar/main.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="statusBar" style="padding: 0 0 12px 0">
-    <el-steps :active="sIndex" align-center :process-status="(sIndex+1)===options.length?'finish':'process'">
+    <el-steps :active="sIndex" align-center :size="'mini'" :process-status="(sIndex+1)===options.length?'finish':'process'">
       <!-- : index === sIndex
             ? 'el-icon-s-check' -->
 

+ 52 - 2
src/styles/index.scss

@@ -582,7 +582,7 @@ aside {
   height: 28px!important;
   // font-size: 16px!important;
   padding:0!important;
-  margin: 20px 0 30px 0!important;
+  // margin: 20px 0 30px 0!important;
 
   // span.title{
   //   line-height: 50px!important;
@@ -672,4 +672,54 @@ aside {
     cursor: pointer!important;
   }
 }
-
+.show-data-table {
+  padding: 0 0 0 0;
+  width: 100%;
+  box-sizing: border-box;
+  .purchaseOrderDetail-addForm {
+    
+    border-left: 1px solid #ebeef5 !important;
+    width: 100%;
+    box-sizing: border-box;
+    &.borderBottom{
+      border-bottom: 1px solid #ebeef5 !important;
+    }
+    .purchaseOrderDetail-addForm-el-col {
+      display: flex;
+      align-items: stretch;
+      //  width: 100%;
+      box-sizing: border-box;
+      //
+      border-right: 1px solid #ebeef5 !important;
+      .label {
+        width: 100px;
+        line-height: 35px;
+        text-align: right;
+        background: #fafafa !important;
+        font-weight: 400 !important;
+        color: #909399 !important;
+        font-size: 12px !important;
+        border-top: 1px solid #ebeef5 !important;
+        border-right: 1px solid #ebeef5 !important;
+      }
+      .name {
+        width: calc(100% - 100px);
+        text-align: left;
+        line-height: 23px;
+        font-size: 12px !important;
+        border-top: 1px solid #ebeef5 !important;
+        padding: 6px 0 6px 10px !important;
+        word-break: break-all !important;
+        color: #606266 !important;
+        .el-icon-warning-outline {
+          font-size: 16px!important;
+          margin: 4px 6px 0 0!important;
+          color: #abaea5!important;
+          &:hover{
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
+}

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

@@ -138,18 +138,21 @@
                 </template>
 
                 <template slot="nakelist">
-                  <el-table
-                    :data="nakelist"
-                    :size="'mini'"
-                    border
-                    stripe
-                    style="width: 99%; margin: 10px 10px 10px 0"
-                  >
-                    <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>
+                  <div v-if="nakelist">
+                    <el-table
+                      :data="nakelist"
+                      :size="'mini'"
+                      border
+                      stripe
+                      style="width: 99%; margin: 10px 10px 10px 0"
+                    >
+                      <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>
+                  </div>
+                  <div v-else>--</div>
                 </template>
               </show-data-table>
               <show-data-table
@@ -158,7 +161,9 @@
                   newTime !== '' &&
                   private_field &&
                   private_field.length > 0 &&
-                  private_field.some((item) => item == '2')
+                  private_field.some((item) => item == '2') &&
+                  ladderlist &&
+                  ladderlist.length > 0
                 "
                 :sitem="sitem"
                 :columns="sale_listCol"

+ 22 - 22
src/views/purchaseIn/purchaseOrder/columns.js

@@ -26,30 +26,30 @@ export default [
     width: "155px",
   },
   
+  // {
+  //   prop: "wsm_supplierNo",
+  //   label: "仓库公司编号",
+  //   width: "145px",
+  // },
+  // {
+  //   prop: "wsm_supplier",
+  //   label: "仓库公司名称",
+  //   width: "155px",
+  // },
+  // {
+  //   prop: "wsm_code",
+  //   label: "仓库编号",
+  //   width: "172px",
+  // },
+  // {
+  //   prop: "wsm_name",
+  //   label: "仓库名称",
+  //   width: "80px",
+  // },
   {
-    prop: "wsm_supplierNo",
-    label: "仓库公司编号",
-    width: "145px",
-  },
-  {
-    prop: "wsm_supplier",
-    label: "仓库公司名称",
-    width: "155px",
-  },
-  {
-    prop: "wsm_code",
-    label: "仓库编号",
-    width: "172px",
-  },
-  {
-    prop: "wsm_name",
-    label: "仓库名称",
-    width: "80px",
-  },
-  {
-    prop: "good_code",
+    prop: "spuCode",
     label: "商品属性编号",
-    width: "145px",
+    width: "158px",
   },
   {
     prop: "good_name",

+ 85 - 81
src/views/purchaseIn/purchaseOrder/components/ShowDataTableColumns.js

@@ -1,85 +1,89 @@
-export default  [
+export default [
 
-    {
-      prop: "cgdNo",
-      label: "采购单编号",
-    },
-    {
-      prop: "bkcode",
-      label: "备库单编号",
-    },
-    // {
-    //   prop: "cgder",
-    //   label: "申请人",
-    // },
-    // {
-    //   prop: "good_code",
-    //   label: "商品编号",
-    // },
-    {
-      prop: "good_type_code",
-      label: "商品属性编号",
-    },
-    {
-      prop: "good_name",
-      label: "商品名称",
-    },
-    {
-      prop: "wsm_supplierNo",
-      label: "仓库供应商编号",
-    },
-    {
-      prop: "wsm_supplier",
-      label: "仓库供应商名称",
-    },
-    {
-      prop: "wsm_code",
-      label: "仓库编号",
-    },
-    {
-      prop: "wsm_name",
-      label: "仓库名称",
-    },
+  {
+    prop: "status",
+    label: "采购单状态",
+    _slot_: "status",
+    span: 6
+  },
+  {
+    prop: "cgder",
+    label: "申请人",
+    span: 6
+  },
+  {
+    prop: "lasttime",
+    label: "要求入库时间",
+    span: 6
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    span: 6
+  },
+  {
+    prop: "supplier_name",
+    label: "销售方公司",
+    _slot_: "supplier_name",
+  },
+  {
+    prop: "supplier_name1",
+    label: "购买方公司",
+    _slot_: "supplier_name1",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+  },
+  {
+    prop: "wsm",
+    label: "仓库信息",
+    _slot_: "wsm",
+  },
+  {
+    prop: "class_cat",
+    label: "商品分类",
+  },
+  {
+    prop: "good_price",
+    label: "品牌",
+    span: 6
+  },
+  {
+    prop: "total_fee",
+    label: "采购总成本",
+    span: 6
+  },
+  {
+    prop: "good_price",
+    label: "采购单价",
+    span: 6
+  },
+  {
+    prop: "good_num",
+    label: "采购总数量",
+    span: 6
+  },
+  {
+    prop: "send_num",
+    label: "已发货数量",
+    span: 6
+  },
+  {
+    prop: "wsend_num",
+    label: "未发货数量",
+    span: 6
+  },
 
-    {
-      prop: "class_cat",
-      label: "商品分类",
-    },
-    {
-      prop: "status",
-      label: "采购单状态",
-      _slot_: "status",
-    },
-    {
-      prop: "good_price",
-      label: "采购单价",
-    },
-    {
-      prop: "good_num",
-      label: "采购总数量",
-    },
-    {
-      prop: "total_fee",
-      label: "采购总成本",
-    },
 
-    {
-      prop: "send_num",
-      label: "已发货数量",
-    },
-    {
-      prop: "wsend_num",
-      label: "未发货数量",
-    },
 
-    {
-      prop: "lasttime",
-      label: "预计最晚入库时间",
-    },
-    
-    {
-      prop: "addtime",
-      label: "创建时间",
-    },
-  ]
-  
+
+  {
+    prop: "remark",
+    label: "备注",
+    span: 24
+  },
+
+]
+

+ 74 - 66
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -5,49 +5,8 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
       <p>{{ status }}---{{ powers }}</p>
-     <div class="detail-page-title">
-        <span>采购单编号:</span><span>{{ queryId }}</span>
-        <el-button
-          @click="statusConfirm('-1', '作废该条信息')"
-          type="danger"
-          plain
-          style="margin: 0 0 0 12px"
-          class="fr"
-          :size="'mini'"
-          v-if="
-            status !== '' &&
-            status !== '5' &&
-            powers.some((item) => item == '015')
-          "
-          >作废该条信息</el-button
-        >
-        <el-button
-          @click="statusConfirm('0', '取消发货')"
-          class="fr"
-          :size="'mini'"
-          style="margin: 0 0 0 12px"
-          v-if="status === '1' && powers.some((item) => item == '027')"
-          >取消入库</el-button
-        >
-        <el-button
-          type="primary"
-          class="fr"
-          style="margin: 0 0 0 12px"
-          :size="'mini'"
-          @click="statusConfirm('1', '开始入库')"
-          v-if="status === '0' && powers.some((item) => item == '026')"
-          >开始入库
-        </el-button>
-        <el-button
-          type="primary"
-          :size="'mini'"
-          class="fr"
-          style="margin: 0 0 0 12px"
-          @click="addForm"
-          v-if="status === '0' && powers.some((item) => item == '007')"
-          >修改采购反馈
-        </el-button>
-
+      <div class="detail-page-title">
+        <span>采购单编号:</span><span>{{ queryId }}---{{ sitem.bkcode }}</span>
         <el-button
           type="primary"
           :size="'mini'"
@@ -60,14 +19,6 @@
           @click="diffAdd = true"
           >填写总工差</el-button
         >
-        <el-button
-          type="primary"
-          :size="'mini'"
-          class="fr"
-          style="margin: 0 0 0 12px"
-          @click="ReturnAddModel = true"
-          >新建采购单退货</el-button
-        >
       </div>
       <status-bar
         v-if="newTime !== ''"
@@ -77,14 +28,58 @@
       />
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
-          <el-collapse v-model="activeNames" style="margin:-18px 0 0 0">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="采购单信息" name="1">
-              <show-data-table 
+              <show-data-table
                 :newTime="newTime"
                 v-if="newTime !== ''"
                 :sitem="sitem"
                 :columns="ShowDataTableColumns"
               >
+                <template slot="supplier_name">
+                  <span>{{ sitem.supplier_name }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>销售方编号:</span
+                        ><span>{{ sitem.supplierNo }}</span>
+                      </li>
+                    </ul>
+                    <i
+                      class="el-icon-warning-outline fr"
+                      slot="reference"
+                    ></i>
+                  </el-popover>
+                </template>
+                <template slot="supplier_name1">
+                  <span>{{ sitem.supplier_name }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>销售方编号:</span
+                        ><span>{{ sitem.supplierNo }}</span>
+                      </li>
+                    </ul>
+                    <i
+                      class="el-icon-warning-outline fr"
+                      slot="reference"
+                    ></i>
+                  </el-popover>
+                </template>
+                <template slot="good_name">
+                  <span>{{ sitem.good_name }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
+                      </li>
+                    </ul>
+                    <i
+                      class="el-icon-warning-outline fr my-class"
+                      slot="reference"
+                    ></i>
+                  </el-popover>
+                </template>
                 <template slot="status">
                   <el-tag
                     :size="'mini'"
@@ -98,11 +93,29 @@
                     "
                   ></el-tag>
                 </template>
-              </show-data-table>
 
-              <!-- <work-diff-table></work-diff-table> -->
+                <template slot="wsm">
+                  <span>{{ sitem.wsm_supplier }}/{{ sitem.wsm_name }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>仓库公司编号:</span
+                        ><span>{{ sitem.wsm_supplierNo }}</span>
+                      </li>
+                      <li>
+                        <span>仓库名称编号:</span
+                        ><span>{{ sitem.wsm_code }}</span>
+                      </li>
+                    </ul>
+                    <i
+                      class="el-icon-warning-outline fr"
+                      slot="reference"
+                    ></i>
+                  </el-popover>
+                </template>
+              </show-data-table>
             </el-collapse-item>
-            <el-collapse-item title="备货入库单" name="2">
+            <el-collapse-item title="入库单" name="2">
               <order-in-table
                 :newTime="newTime"
                 v-if="newTime !== ''"
@@ -111,6 +124,9 @@
                 @refresh="initData()"
               />
             </el-collapse-item>
+            <el-collapse-item title="工差单" name="3">
+              <work-diff-table></work-diff-table>
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="2">
@@ -122,19 +138,13 @@
           />
         </el-tab-pane>
       </el-tabs>
-      <!-- <diff-order-add
+      <diff-order-add
         :sitem="sitem"
         :show-model="diffAdd"
         @refresh="initData"
         @cancel="diffAdd = false"
-      /> -->
-      <!-- 采购单退货弹窗 -->
-      <purchase-return-add
-        :sitem="sitem"
-        :show-model="ReturnAddModel"
-        @refresh="initData()"
-        @cancel="ReturnAddModel = false"
       />
+
       <order-addedit-model
         :id="modelId"
         :show-model="showModel"
@@ -157,14 +167,12 @@ import ShowDataTableColumns from "./components/ShowDataTableColumns";
 // import diffOrderAdd from "@/views/purchaseIn/purchaseDiffOrder/addEditModel";
 // import WorkDiffTable from "./components/workDiff-table.vue";
 import orderAddeditModel from "./components/order-addedit-model";
-import PurchaseReturnAdd from "@/views/purchaseIn/purchaseReturn/addEdit"; //采购单退货弹窗
 export default {
   name: "purchaseOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
     orderInTable,
     orderAddeditModel,
-    PurchaseReturnAdd, //采购单退货弹窗
   },
 
   computed: {

+ 0 - 249
src/views/purchaseIn/purchaseReturn/addEdit.vue

@@ -1,249 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="15vh"
-    width="600px"
-    @close="showModelThis = false"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card style="margin: -20px 0 0 0">
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="100px"
-            class="demo-ruleForm"
-          >
-            <el-row>
-              <el-form-item label="商品分类" prop="goods_class">
-                <el-input v-model="ruleForm.goods_class" disabled></el-input>
-              </el-form-item>
-              <el-form-item label="商品名称" prop="good_name">
-                <el-input v-model="ruleForm.good_name" disabled></el-input>
-              </el-form-item>
-              <el-col :span="12">
-                <el-form-item label="采购总数量" prop="good_num">
-                  <el-input
-                    v-model="ruleForm.good_num"
-                    disabled
-                  /> </el-form-item
-              ></el-col>
-              <el-col :span="12">
-                <el-form-item label="已入库数量" prop="send_num">
-                  <el-input
-                    v-model="ruleForm.send_num"
-                    disabled
-                  /> </el-form-item
-              ></el-col>
-              <el-col :span="12">
-                <el-form-item label="未入库数量" prop="wsend_num">
-                  <el-input v-model="ruleForm.wsend_num" disabled />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="退货数量" prop="return_num">
-                  <el-input
-                    v-model="ruleForm.return_num"
-                    :disabled="isDetail"
-                  />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right">
-          <el-button
-            type="primary"
-            :size="'mini'"
-            @click="submitForm"
-            v-if="!isDetail"
-            >保 存
-          </el-button>
-          <el-button :size="'mini'" @click="showModelThis = false">{{
-            isDetail ? "关 闭" : "取 消"
-          }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/purchaseIn/purchaseReturn";
-import resToken from "@/mixins/resToken";
-import { isnumber } from "@/utils/validate";
-export default {
-  name: "purchaseReturnAdd",
-  props: ["showModel", "id", "isDetail", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("退货数量不能为空!"));
-      } else {
-        if (value.length > 50) {
-          callback(new Error("退货数量位数不能超过50位!"));
-        } else {
-          if (!isnumber(value)) {
-            callback(new Error("请填写正确的退货数量!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    return {
-      loading: false,
-      title: "新建采购单退货",
-      showModelThis: this.showModel,
-      ruleForm: {
-        cgdNo: "",
-        return_num: "", //退货数量
-        good_name: "",
-        wsend_num: "",
-      },
-      rulesThis: this.rules,
-      rules: {
-        return_num: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: "blur",
-          },
-        ],
-        good_name: [
-          {
-            required: true,
-            trigger: "blur",
-            message: "请填写商品名称",
-          },
-        ],
-        goods_class: [
-          {
-            required: true,
-            trigger: "blur",
-            message: "请填写商品分类名称",
-          },
-        ],
-        wsend_num: [
-          {
-            required: true,
-            trigger: "blur",
-            message: "请填写商品数量",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm(this.sitem);
-      this.loading = false;
-    },
-    async initData() {
-      const res = await asyncRequest.detail({ id: this.id });
-      if (res && res.code === 0 && res.data) {
-        this.ruleForm = res.data;
-        this.ruleForm.role_id = this.ruleForm.role;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async resetForm(sitem) {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          console.log(this.sitem);
-          const {
-            good_name,
-            goods_class,
-            wsend_num,
-            cgdNo,
-            good_num,
-            send_num,
-          } = this.sitem;
-          this.ruleForm = {
-            good_num: good_num || "",
-            send_num: send_num || "",
-            cgdNo: cgdNo || "",
-            return_num: "", //退货数量
-            good_name: good_name || "",
-            goods_class: goods_class || "",
-            wsend_num: wsend_num || "",
-          };
-        }
-      });
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-
-          const model = JSON.parse(JSON.stringify(this.ruleForm));
-          if (Number(model.return_num) > Number(model.wsend_num)) {
-            this.$message.warning("退货数量不能大于未发货数量");
-            this.loading = false;
-            return;
-          }
-          delete model["good_name"];
-          delete model["goods_class"];
-          delete model["wsend_num"];
-          const res = await asyncRequest.add(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "添加成功",
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            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>
-.purchaseReturn {
-}
-</style>
-   

+ 0 - 1
src/views/purchaseIn/purchaseReturn/detail.vue

@@ -8,7 +8,6 @@
       <div class="detail-page-title">
         <span>采购退货单编号:</span
         ><span v-if="sitem">{{ sitem.bk_code }}</span>
-
         <el-button
           v-if="
             powers.some((item) => item === '015') &&

+ 73 - 86
src/views/purchaseIn/purchaseReturn/index.vue

@@ -26,86 +26,86 @@
         <template #table-header="{}">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
-                <el-col :span="4" style="width: 150px; padding: 0 0 0 0px">
+              <el-col :span="4" style="width: 150px; padding: 0 0 0 0px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusOptions"
+                    :key="'status' + item.id"
+                    :label="item.label"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
+              <!-- 下拉筛选 -->
+              <el-col :span="6" style="width: 400px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  placeholder="关键字"
+                  v-model="s_input"
+                  :size="searchSize"
+                  class="input-with-select"
+                >
                   <el-select
-                    :size="searchSize"
-                    v-model="parmValue.status"
-                    filterable
-                    clearable
-                    placeholder="状态"
-                    style="width: 100%"
-                    @change="
-                      pageInfo.curr = 1;
-                      parmValue.page = 1;
-                      searchList();
-                    "
+                    v-model="select"
+                    style="width: 125px"
+                    slot="prepend"
+                    placeholder="请选择"
                   >
                     <el-option
-                      v-for="item in statusOptions"
-                      :key="'status' + item.id"
-                      :label="item.label"
-                      :value="item.id"
-                    />
+                      label="退货单编号"
+                      value="returnCode"
+                    ></el-option>
+                    <el-option label="采购单编号" value="cgdNo"></el-option>
+                    <el-option
+                      label="商品属性编码"
+                      value="good_type_code"
+                    ></el-option>
+                    <el-option label="商品名称" value="good_name"></el-option>
                   </el-select>
-                </el-col>
-                <!-- 下拉筛选 -->
-                <el-col :span="6" style="width: 400px; padding: 0 0 0 10px">
-                  <el-input
-                    clearable
-                    placeholder="关键字"
-                    v-model="s_input"
-                    :size="searchSize"
-                    class="input-with-select"
-                  >
-                    <el-select
-                      v-model="select"
-                      style="width: 125px"
-                      slot="prepend"
-                      placeholder="请选择"
-                    >
-                      <el-option
-                        label="退货单编号"
-                        value="returnCode"
-                      ></el-option>
-                      <el-option label="采购单编号" value="cgdNo"></el-option>
-                      <el-option
-                        label="商品属性编码"
-                        value="good_type_code"
-                      ></el-option>
-                      <el-option label="商品名称" value="good_name"></el-option>
-                    </el-select>
-                    <el-button
-                      slot="append"
-                      icon="el-icon-search"
-                      @click="handleValue"
-                    ></el-button>
-                  </el-input>
-                </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"
+                    slot="append"
+                    icon="el-icon-search"
+                    @click="handleValue"
+                  ></el-button>
+                </el-input>
+              </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"
+                class="fr"
+                style="width: 66px; padding: 0 0 0 10px"
+              >
+                <el-button
+                  type="warning"
                   class="fr"
-                  style="width: 66px; padding: 0 0 0 10px"
+                  :size="searchSize"
+                  @click="restSearch"
                 >
-                  <el-button
-                    type="warning"
-                    class="fr"
-                    :size="searchSize"
-                    @click="restSearch"
-                  >
-                    重置
-                  </el-button>
-                </el-col>
+                  重置
+                </el-button>
+              </el-col>
             </el-row>
           </div>
         </template>
@@ -142,7 +142,6 @@
           ></p>
         </template>
         <template #operation="{ scope }">
-
           <el-tooltip
             v-if="powers.some((item) => item == '007')"
             effect="dark"
@@ -195,14 +194,6 @@
           </el-tooltip>
         </template>
       </ex-table>
-      <add-edit
-        :id="modelId"
-        :sitem="sitem"
-        :show-model="showModel"
-        :is-detail="isDetail"
-        @refresh="searchList"
-        @cancel="showModel = false"
-      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -214,15 +205,11 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import columns from "./columns";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseReturn";
-import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 
 export default {
   name: "purchaseReturn",
   mixins: [mixinPage, resToken],
-  components: {
-    addEdit,
-  },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {

+ 32 - 25
src/views/sellOut/salesOrder/columns.js

@@ -2,37 +2,24 @@ export default [
   {
     prop: "orderCode",
     label: "销售订单编号",
-    width: "150px",
-  },
-  {
-    prop: "apply_name",
-    label: "申请人",
-    width: "60px",
-  },
-  {
-    prop: "customer_code",
-    label: "客户公司编码",
-    width: "125px",
-  },
-  {
-    prop: "customerName",
-    label: "企业客户名称",
-    width: "125px",
-  },
-  {
-    prop: "good_code",
-    label: "商品编码",
-    width:"128"
+    width: "155px",
   },
+
+
+  // {
+  //   prop: "good_code",
+  //   label: "商品编码",
+  //   width:"128"
+  // },
   {
     prop: "good_name",
     label: "商品名称",
-    width:"150"
+    width: "150"
   },
   {
     prop: "good_class",
     label: "商品分类",
-    width:"120"
+    width: "120"
 
   },
 
@@ -48,8 +35,8 @@ export default [
     prop: "total_price",
     label: "总价",
   },
- 
- 
+
+
 
 
   {
@@ -58,6 +45,26 @@ export default [
     _slot_: "status",
     width: "120px",
   },
+  {
+    prop: "apply_name",
+    label: "申请人",
+    width: "60px",
+  },
+  {
+    prop: "customer_code",
+    label: "客户公司编码",
+    width: "155px",
+  },
+  {
+    prop: "customerName",
+    label: "企业客户名称",
+    width: "125px",
+  },
+  {
+    prop: "supplierName",
+    label: "销售方公司",
+    width: "125px",
+  },
 
   {
     prop: "addtime",

+ 155 - 23
src/views/sellOut/salesOrder/components/ShowDataTableColumns.js

@@ -61,64 +61,196 @@ const addColumns = [
   },
 ]
 const showColumns = [
+  {
+    prop: "orderCode",
+    label: "订单编号",
+    span: 6,
+  },
+  {
+    prop: "status",
+    label: "订单状态",
+    _slot_: "status",
+    span: 6,
+  },
+  {
+    prop: "order_type",
+    label: "订单类型",
+    _slot_: "order_type",
+    span: 6,
+  }, {
+    prop: "apply_name",
+    label: "创建人",
+    span: 6,
+  },
+
+  {
+    prop: "supplierName",
+    label: "销售方公司",
+    span: 12,
+  },
+  {
+    prop: "companyName",
+    label: "企业客户",
+    span: 12,
+  },
   {
     prop: "good_name",
     label: "商品名称",
     _slot_: "good_name",
-    span: 24,
+    span: 12,
   },
+
   {
-    prop: "good_info_img",
-    _slot_: "good_info_img",
-    label: "详情图",
-    span: 24,
+    prop: "good_code",
+    label: "SPU编号",
+    span: 6,
+  },
+  {
+    prop: "skuCode",
+    label: "SKU编号",
+    span: 6,
   },
   {
     prop: "cat",
     label: "分类",
     _slot_: "cat",
-    span: 24,
+    span: 10,
   },
   {
     prop: "brand_name",
     label: "品牌",
-    span: 24,
+    span: 8,
   },
   {
-    prop: "is_stock",
-    label: "是否库存品",
-    _slot_: "is_stock",
-    span: 8,
+    prop: "platform_id",
+    label: "所属平台",
+    span: 6,
   },
-
   {
     prop: "unit",
     label: "单位",
-    span: 8,
+    span: 6,
   },
   {
     prop: "tax",
     label: "税点",
     append: '%',
-    span: 8,
+    span: 6,
+  },
+  {
+    prop: "good_num",
+    label: "购买数量",
+    span: 6,
+  },
+  {
+    prop: "send_num",
+    label: "已发数量",
+    span: 6,
+  },
+  {
+    prop: "wsend_num",
+    label: "未发数量",
+    span: 6,
+  },
+  {
+    prop: "th_num",
+    label: "退货数量",
+    span: 6,
   },
+  // {
+  //   prop: "is_stock",
+  //   label: "是否库存品",
+  //   _slot_: "is_stock",
+  //   span: 4,
+  // },
+
+
+
+  // {
+  //   prop: "exclusive",
+  //   label: "专属类型",
+  //   _slot_: "exclusive",
+  //   span: 24,
+  // },
+
+  // {
+  //   prop: "weight",
+  //   label: "商品总克重",
+  //   _slot_: "weight",
+  //   span: 24,
+  // },
 
   {
-    prop: "exclusive",
-    label: "专属类型",
-    _slot_: "exclusive",
-    span: 24,
+    prop: "arrive_time",
+    label: "要求到货时间",
+    span: 6,
+  },
+  {
+    prop: "origin_price",
+    label: "原价",
+    append: '元',
+    span: 6,
+  },
+  {
+    prop: "sale_price",
+    label: "售价",
+    append: '元',
+    span: 6,
+  },
+  {
+    prop: "sale_price",
+    label: "总金额",
+    append: '元',
+    span: 6,
   },
 
   {
-    prop: "weight",
-    label: "商品总克重",
-    _slot_: "weight",
+    prop: "paytime",
+    label: "承诺付款时间",
+    span: 6,
+  },
+
+  {
+    prop: "post_fee",
+    label: "物流费用",
+    append: '元',
+    span: 6,
+  },
+
+  {
+    prop: "useage",
+    label: "订单用途",
+    span: 12,
+  },
+  {
+    prop: "send_type",
+    label: "发货类型",
+    _slot_: "send_type",
+    span: 6,
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    span: 6,
+  },
+  {
+    prop: "platform_order",
+    label: "平台订单号",
+    span: 12,
+  },
+  {
+    prop: "workNo",
+    label: "其他单号",
+    span: 12,
+  },
+  {
+    prop: "remark",
+    label: "备注",
     span: 24,
   },
   {
-    prop: "after_sales",
-    label: "售后说明",
+    prop: "remark",
+    label: "其他信息",
     span: 24,
   },
 ]

+ 4 - 4
src/views/sellOut/salesOrder/components/addForm.vue

@@ -172,7 +172,7 @@
                 </show-data-table>
               </el-form-item>
             </el-col>
-            <el-col :span="12" v-if="ruleForm.good_code">
+            <el-col :span="12" v-show="ruleForm.good_code">
               <el-row>
                 <el-col :span="24">
                   <el-form-item label="活动类型" prop="goodtype">
@@ -884,19 +884,19 @@ export default {
             supplierNo: "", //销售方编码
             customer_code: [], // 企业客户选择
             platform_id: "",
-            arrtime: "2022-03-31", //要求到货时间
+            arrtime: "", //要求到货时间
             proof_id: "", //凭证ID
             proof_type: "", //凭证类型
             proof_url: "", //凭证地址
             activity_stock: "0",
             goodtype: ["is_activity_0", "1"], //活动类型
-            good_num: "10", //商品数量
+            good_num: "0", //商品数量
             good_price: "0", //商品单价
             platform_order: "", //平台订单号
             paytime: "", //承诺回款时间
             workNo: "", //其他单号
             sendtype: "1", //发货方式
-            remark: "11", //备注
+            remark: "", //备注
             good_code: "", // 商品编号
           };
         }

+ 0 - 288
src/views/sellOut/salesOrder/components/feedback-form.vue

@@ -1,288 +0,0 @@
-<template>
-  <div class="salesOrderDetail">
-    <el-row>
-      <el-col :span="24" style="padding: 0 0 22px 0">
-        <el-form :model="addrForm" ref="addrForm" :size="'mini'">
-          <el-table
-            :data="addrForm.order_addr"
-            border
-            :size="'mini'"
-            style="width: 100%"
-            row-key="key"
-          >
-            <el-table-column
-              show-overflow-tooltip
-              prop="receipt_quantity"
-              label="收货总数"
-              width="110"
-            />
-
-            <el-table-column
-              show-overflow-tooltip
-              prop="arrive_time"
-              label="最晚收货日期"
-              width="145"
-            />
-            <el-table-column
-              show-overflow-tooltip
-              prop="contactor"
-              label="收件联系人"
-              width="85"
-            />
-
-            <el-table-column
-              show-overflow-tooltip
-              prop="mobile"
-              label="收货联系电话"
-              width="110"
-            />
-
-            <el-table-column
-              show-overflow-tooltip
-              prop="addr"
-              label="收货地址"
-              min-width="200"
-            />
-
-            <el-table-column
-              prop="post_fee"
-              label="预计物流费用"
-              min-width="170"
-            >
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="'order_addr.' + scope.$index + '.' + 'post_fee'"
-                  :rules="addrRules.post_fee"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <el-input
-                    v-model="scope.row.post_fee"
-                    :disabled="!scope.row.edit"
-                  />
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column
-              fixed="right"
-              width="50"
-              label="操作"
-              v-if="status === '1' && powers.some((item) => item == '033')"
-            >
-              <template slot-scope="scope">
-                <el-tooltip
-                  effect="dark"
-                  content="编辑"
-                  v-if="!scope.row.edit"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-edit tb-icon"
-                    @click="openHouseModal(scope.$index)"
-                  ></i>
-                </el-tooltip>
-
-                <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>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-form>
-      </el-col>
-      <el-col
-        :span="24"
-        style="text-align: right; padding: 0 0 20px 0"
-        v-if="status === '1' && powers.some((item) => item == '033')"
-      >
-        <el-button :size="'mini'" type="primary" @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
-import searchStockGoodModal from "@/components/search-stock-good-modal";
-import { isnumber, isnumber2 } from "@/utils/validate";
-export default {
-  name: "salesOrderDetail",
-  mixins: [mixinPage, resToken],
-  props: ["newTime", "id", "sitem"],
-  components: { searchStockGoodModal },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "salesOrderDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-
-  data() {
-    const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("物流费用不能为空"));
-      } else {
-        if (isnumber()) {
-          callback();
-        } else if (isnumber2(value)) {
-          callback();
-        } else {
-          callback(new Error("物流费用仅支持整数或两位小数!"));
-        }
-      }
-    };
-
-    return {
-      showGoodsModel: false,
-      stock_code: "",
-      addrForm: {
-        order_addr: [], //收货地址
-      },
-      addrRules: {
-        post_fee: {
-          required: true,
-          validator: validateWeight,
-          trigger: "blur",
-        },
-      },
-      loading: false,
-      queryId: "",
-      status: "",
-    };
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.status = "";
-      this.queryId = this.$route.query.id;
-      this.rulesThis = this.rules;
-      this.resetForm();
-    },
-
-    getNewTime() {
-      this.newTime = new Date().valueOf();
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.addrForm) {
-          this.$refs.addrForm.resetFields();
-          this.$refs.addrForm.clearValidate();
-          const { addrs, status } = this.sitem;
-          this.status = status;
-          this.addrForm = {
-            order_addr: [],
-          };
-          if (addrs && addrs.length > 0) {
-            addrs.forEach((v) => {
-              let model = {
-                edit: false,
-                arrive_time: v.arrive_time || "",
-                receipt_quantity: v.receipt_quantity || "",
-                contactor: v.contactor || "",
-                mobile: v.mobile || "",
-                addr: v.addr_info + v.addr || "",
-                id: v.id,
-                post_fee: v.post_fee || "",
-                is_del: 0,
-              };
-              this.addrForm.order_addr.push(model);
-            });
-          }
-        }
-      });
-    },
-
-    openHouseModal(index) {
-      let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
-      if (findex !== -1) {
-        this.$message.warning("当前已有地址在编辑,请保存后再试!");
-        return;
-      } else {
-        this.addrForm.order_addr[index].edit = true;
-      }
-    },
-
-    //省市区保存某一行
-    checkRow(rowIndex) {
-      this.$refs.addrForm.validate((valid) => {
-        if (valid) {
-          this.addrForm.order_addr[rowIndex].edit = false;
-        } else {
-          return false;
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.addrForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
-          let model = {
-            id: this.queryId,
-            order_addr: [],
-          };
-          order_addr.forEach((v2) => {
-            let model2 = {
-              post_fee: v2.post_fee,
-              id: v2.id,
-            };
-            model.order_addr.push(model2);
-          });
-          let res = await asyncRequest.salefee(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "反馈物流费用成功!",
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            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>
-.salesOrderDetail {
-}
-</style>
-   
-   

+ 9 - 19
src/views/sellOut/salesOrder/components/order-out-table.vue

@@ -5,34 +5,23 @@
       :data="tableData"
       border
       :size="'mini'"
+      max-height="300px"
       style="width: 100%"
       row-key="key"
     >
-      <!-- <el-table-column
-        show-overflow-tooltip
-        prop="orderCode"
-        label="出库订单号"
-        width="150"
-      /> -->
 
       <el-table-column
         show-overflow-tooltip
         prop="outCode"
         label="出库单号"
-        width="150"
+        width="155"
       />
-      <!-- <el-table-column
-        show-overflow-tooltip
-        prop="apply_name"
-        label="申请人名称"
-        width="85"
-      /> -->
 
       <el-table-column
         show-overflow-tooltip
         prop="post_name"
         label="物流公司"
-        width="110"
+        min-width="110"
       />
       <el-table-column
         show-overflow-tooltip
@@ -47,6 +36,7 @@
         width="80"
       >
         <template slot-scope="scope">
+          {{scope.row.status}}
           <el-tag
             :size="tablebtnSize"
             :type="scope.row.status == '0' ? 'warning' : ''"
@@ -60,7 +50,7 @@
 
       <el-table-column
         show-overflow-tooltip
-        prop="send_num"
+        prop="receipt_quantity"
         label="发货数量"
         width="80"
       />
@@ -80,7 +70,7 @@
         show-overflow-tooltip
         prop="addr"
         label="收货地址"
-        width="170"
+        min-width="170"
       >
         <template slot-scope="scope">
           {{ scope.row.addr_info }}{{ scope.row.addr }}
@@ -90,7 +80,7 @@
         show-overflow-tooltip
         prop="sendtime"
         label="发货时间"
-        min-width="170"
+        width="145"
       />
       <el-table-column
         fixed="right"
@@ -234,10 +224,10 @@ export default {
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
-        const { orderout, status } = this.sitem;
+        const { addrs, status } = this.sitem;
         this.status = status;
         console.log(this.status);
-        this.tableData = JSON.parse(JSON.stringify(orderout));
+        this.tableData = JSON.parse(JSON.stringify(addrs));
       });
     },
 

+ 14 - 116
src/views/sellOut/salesOrder/detail.vue

@@ -4,40 +4,12 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <p>{{ status }}----{{ powers }}</p>
-      <!-- class="detail-page-title" -->
       <div>
-        <span>销售订单编号:</span
+        <span>订单编号:</span
         ><span v-if="sitem">{{ sitem.orderCode }}</span>
-        <!-- <el-button
-          @click="statusConfirm('-1', '作废该条信息')"
-          type="danger"
-          plain
-          class="fr"
-          :size="'mini'"
-          v-if="
-            (status == '0' ||
-              status == '1' ||
-              status == '2' ||
-              status == '3') &&
-            powers.some((item) => item == '015')
-          "
-          >作废该条信息</el-button
-        > -->
-        <el-button
-          @click="statusConfirm('0', '取消审核流程')"
-          plain
-          :size="'mini'"
-          class="fr"
-          type="primary"
-          v-if="
-            (status === '1' || status === '2' || status === '3') &&
-            powers.some((item) => item == '014')
-          "
-          >取消审核流程</el-button
-        >
+         <!-- v-if="status === '4' && powers.some((item) => item == '051')" -->
         <el-button
-          v-if="status === '4' && powers.some((item) => item == '051')"
+         
           style="margin: 0 0 0 10px"
           class="fr"
           type="primary"
@@ -46,13 +18,6 @@
           >新建销售退货单
         </el-button>
       </div>
-
-      <status-bar
-        v-if="newTime !== '' && queryType !== 'add'"
-        :newTime="newTime"
-        :options="statusOptions"
-        :status="status"
-      />
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="新建销售订单" name="0" v-if="queryType === 'add'">
           <add-form
@@ -71,7 +36,7 @@
                 style="margin: 0; padding: 0"
                 :sitem="sitem"
                 v-if="status"
-                :columns="ShowDataTableColumns"
+                :columns="showColumns"
               >
                 <template slot="good_name">
                   <img
@@ -83,26 +48,14 @@
                     alt=""
                   />
                   <span>{{ sitem.good_name }}</span>
-                  <span
-                    v-for="(si, i) in sitem.specinfo"
-                    :key="si.spec_id + i"
-                  >
+                  <span v-for="(si, i) in sitem.specinfo" :key="si.spec_id + i">
                     <span>{{ i === 0 ? "--" : "__" }}</span
                     ><span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
                   </span>
                 </template>
-                <template slot="good_info_img">
-                  <img
-                    class="fl"
-                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
-                    v-viewer
-                    v-for="(si, i) in sitem.good_info_img"
-                    :src="si"
-                    :key="si + i"
-                  />
-                </template>
+              
                 <template slot="cat">
-                  <span v-for="(si, sii) in sitem.cat_info" :key="si.id"
+                  <span v-for="(si, sii) in sitem.can" :key="si.id"
                     ><span v-if="sii !== 0">_</span><span>{{ si.name }}</span>
                   </span>
                 </template>
@@ -123,71 +76,18 @@
                     }}</span
                   >
                   <span v-if="sitem.metal_id"
-                    >--{{
-                      sitem.noble_weight ? sitem.noble_weight : "0"
-                    }}g--{{ sitem.metal_name }}---{{
-                      sitem.gold_price ? sitem.gold_price : "0"
-                    }}元/g--{{
+                    >--{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g--{{
+                      sitem.metal_name
+                    }}---{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g--{{
                       sitem.is_gold_price === "0" ? "不" : ""
                     }}启用实时金价--{{
                       sitem.is_diff === "1" ? "有" : "无"
-                    }}工差--{{ sitem.config }}---{{
-                      sitem.other_config
-                    }}</span
+                    }}工差--{{ sitem.config }}---{{ sitem.other_config }}</span
                   >
                 </template>
               </show-data-table>
             </el-collapse-item>
-            <!-- <el-collapse-item
-              title="发起申请流程"
-              name="0"
-              v-if="status === '0' && powers.some((item) => item == '012')"
-            >
-              <div style="height: 60px" class="tr">
-                <el-button
-                  type="primary"
-                  plain
-                  :size="'mini'"
-                  @click="statusConfirm('1', '发起审核流程')"
-                  v-if="status === '0' && powers.some((item) => item == '012')"
-                  >发起审核流程
-                </el-button>
-              </div>
-            </el-collapse-item> -->
-            <!-- <el-collapse-item
-              title="采购反馈物流"
-              name="1"
-              v-if="
-                (status === '1' && powers.some((item) => item == '033')) ||
-                status === '2' ||
-                status === '3' ||
-                status === '4'
-              "
-            >
-              <feedback-form
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                :id="queryId"
-                @refresh="initData()"
-              />
-            </el-collapse-item> -->
-            <!-- <el-collapse-item
-              title="同意下单"
-              name="6"
-              v-if="status === '2' && powers.some((item) => item == '026')"
-            >
-              <el-button
-                class="fr"
-                style="margin: 0 0 20px 0"
-                type="primary"
-                plain
-                :size="'mini'"
-                @click="statusConfirm('3', '同意下单')"
-                >同意下单,开始发货
-              </el-button>
-            </el-collapse-item> -->
-            <!-- <el-collapse-item title="销售出库单" name="3">
+            <el-collapse-item title="发货单" name="3">
               <order-out-table
                 :newTime="newTime"
                 v-if="newTime !== ''"
@@ -195,7 +95,7 @@
                 :id="queryId"
                 @refresh="initData()"
               />
-            </el-collapse-item> -->
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
@@ -234,7 +134,6 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import addForm from "./components/addForm";
-import feedbackForm from "./components/feedback-form";
 import orderOutTable from "./components/order-out-table";
 import addModel from "@/views/sellOut/sellReturn/components/addModel";
 import { showColumns } from "./components/ShowDataTableColumns";
@@ -244,7 +143,6 @@ export default {
   components: {
     addModel,
     addForm,
-    feedbackForm,
     orderOutTable,
   },
   computed: {
@@ -265,7 +163,7 @@ export default {
       finishStatus: "finish",
       activeTabs: "1",
       activeNames: ["-1", "0", "1", "2", "3", "4", "5", "6"],
-      ShowDataTableColumns: showColumns,
+      showColumns: showColumns,
       statusOptions: [
         { value: "0", label: "待发起流程" },
         { value: "1", label: "待反馈物流" },

+ 66 - 40
src/views/sellOut/salesOrder/index.vue

@@ -36,8 +36,30 @@
                   @timeReturned="handleTime"
                 />
               </el-col>
+              <el-col :span="4" style="width: 148px; padding: 0 0 0 8px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="订单状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusOptions"
+                    :key="'status' + item.id"
+                    :label="item.label"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
               <!-- 客户公司 -->
-              <el-col :span="4" style="width: 320px; padding: 0px 0 0 10px">
+              <el-col :span="4" style="width: 400px; padding: 0 0 0 10px">
                 <search-customer
                   :value="customerCode"
                   :size="searchSize"
@@ -45,6 +67,7 @@
                   @searchChange="customerChange"
                 />
               </el-col>
+
               <el-col :span="3" style="width: 66px; float: right">
                 <el-button
                   :size="searchSize"
@@ -57,13 +80,25 @@
               </el-col>
             </el-row>
             <el-row style="padding: 10px 0 0 0">
-              <el-col :span="4" style="width: 150px; padding: 0 0 0 0px">
+              <el-col :span="6" style="width: 371px; ">
+                <search-work-company
+                  :type="'1'"
+                  :value="parmValue.supplierNo"
+                  :size="'mini'"
+                  :placeholder="'销售方公司'"
+                  :disabled="false"
+                  :isDetail="false"
+                  @searchChange="supplierChange"
+                />
+              </el-col>
+
+              <el-col :span="4" style="width: 150px; padding: 0 0 0 9px">
                 <el-select
                   :size="searchSize"
-                  v-model="parmValue.status"
+                  v-model="parmValue.order_type"
                   filterable
                   clearable
-                  placeholder="销售订单状态"
+                  placeholder="订单类型"
                   style="width: 100%"
                   @change="
                     pageInfo.curr = 1;
@@ -72,35 +107,37 @@
                   "
                 >
                   <el-option
-                    v-for="item in statusOptions"
-                    :key="'status' + item.id"
+                    v-for="item in orderOptions"
+                    :key="'orderstatus' + item.id"
                     :label="item.label"
                     :value="item.id"
                   />
                 </el-select>
               </el-col>
-              <el-col :span="6" style="width: 500px; padding: 0 0 0 10px">
+              <el-col :span="6" style="width: 450px; padding: 0 0 0 10px">
                 <el-input
                   clearable
                   placeholder="关键字"
                   v-model="input"
                   :size="searchSize"
+                  @blur="searchList"
                   class="input-with-select"
                 >
                   <el-select
                     v-model="select"
-                    style="width: 125px"
+                    style="width: 137px"
                     slot="prepend"
                     placeholder="请选择"
+                    @change="searchList"
                   >
                     <el-option
                       label="销售订单编号"
                       value="orderCode"
                     ></el-option>
-                    <el-option
+                    <!-- <el-option
                       label="商品属性编号"
                       value="good_code"
-                    ></el-option>
+                    ></el-option> -->
                     <!-- <el-option
                       label="供应商编号"
                       value="supplierNo"
@@ -109,14 +146,9 @@
                       label="客户编号"
                       value="customer_code"
                     ></el-option> -->
-                    <el-option label="品名称" value="good_name"></el-option>
+                    <el-option label="品名称" value="good_name"></el-option>
                     <el-option label="申请人" value="apply_name"></el-option>
                   </el-select>
-                  <el-button
-                    slot="append"
-                    icon="el-icon-search"
-                    @click="searchList"
-                  ></el-button>
                 </el-input>
               </el-col>
 
@@ -223,22 +255,25 @@ export default {
       select: "orderCode",
       input: "",
       customerCode: [],
-      options: ["创建时间", "最晚入库时间"],
       // 状态
       statusOptions: [
-        { id: "0", label: "待发起流程" },
-        { id: "1", label: "待反馈物流" },
-        { id: "2", label: "待同意下单" },
-        { id: "3", label: "待发货" },
-        { id: "4", label: "待发货完成" },
-        { id: "5", label: "发货已完成" },
+        { id: "0", label: "待发货" },
+        { id: "1", label: "待发货完成" },
+        { id: "2", label: "发货已完成" },
+        { id: "3", label: "订单已取消" },
+      ],
+      orderOptions: [
+        { id: "1", label: "线上商品销售" },
+        { id: "2", label: "项目线上商品销售" },
+        { id: "3", label: "咨询单销售" },
+        { id: "4", label: "项目咨询单销售" },
       ],
       loading: false,
       showModel: false,
       isDetail: false,
       modelId: 0,
       parmValue: {
-        order_type: "", //订单类型1为销售 2为咨询
+        order_type: "", //订单类型
         orderCode: "", //销售订单code
         apply_name: "", // 申请人
         good_name: "", // 产品名称
@@ -307,14 +342,9 @@ export default {
       this.showModel = true;
     },
     async supplierChange(e) {
-      if (e && e.id) {
-        this.parmValue.supplierNo = [e.code];
-        this.supplierNo = e.code;
-      } else {
-        this.parmValue.supplierNo = [];
-        this.supplierNo = "";
-      }
-      this.parmValue.stockNo = [];
+      console.log(e);
+      const { id, code, label } = e;
+      this.parmValue.supplierNo = code || "";
       this.parmValue.page = 1;
       this.pageInfo.curr = 1;
       await this.searchList();
@@ -346,14 +376,10 @@ export default {
     },
     async searchList() {
       this.loading = true;
-      this.parmValue.orderCode = this.select === "orderCode" ? this.input : ""; // 采购单编码
-      this.parmValue.good_code = this.select === "good_code" ? this.input : ""; // 入库单号
-      this.parmValue.supplierNo =
-        this.select === "supplierNo" ? this.input : ""; // 产品属性编号
-      this.parmValue.good_name = this.select === "good_name" ? this.input : ""; // 申请人
+      this.parmValue.orderCode = this.select === "orderCode" ? this.input : "";
+      this.parmValue.good_name = this.select === "good_name" ? this.input : "";
       this.parmValue.apply_name =
-        this.select === "apply_name" ? this.input : ""; // 采购供应商编号
-      this.parmValue.order_type = ""; //订单类型1为销售订单 2为咨询订单
+        this.select === "apply_name" ? this.input : "";
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
@@ -361,7 +387,7 @@ export default {
           v.good_class = "";
           if (v.can && v.can.length > 0) {
             v.can.forEach((x, i) => {
-              v.good_class += i === 0 ? x.name : "/" + x.name;
+              v.good_class += i === 0 ? x.name : "_" + x.name;
             });
           }
         });

+ 48 - 132
src/views/sellOut/sellReturn/components/addForm.vue

@@ -6,95 +6,40 @@
         status-icon
         :rules="rulesThis"
         ref="ruleForm"
-        label-width="95px"
+        :size="'mini'"
+        label-width="80px"
         class="demo-ruleForm"
       >
-        <el-form-item label="退换货原因" prop="errorCode">
-          <abnormal-cause
-            :value="ruleForm.errorCode"
-            :placeholder="'退换货原因'"
-            :type="'5'"
-            @searchChange="errorCode_change"
-          />
-        </el-form-item>
+        <el-row :gutter="10">
+          <el-col :span="8">
+            <el-form-item label="退货原因" prop="errorCode">
+              <abnormal-cause
+                :value="ruleForm.errorCode"
+                :placeholder="'退货原因'"
+                :type="'5'"
+                :size="'mini'"
+                @searchChange="errorCode_change"
+              />
+            </el-form-item> </el-col
+          ><el-col :span="16">
+            <el-form-item label="退货备注" prop="remark">
+              <el-input
+                :disabled="isDetail"
+                type="textarea"
+                maxlength="250"
+                show-word-limit
+                placeholder="请填写备注"
+                v-model="ruleForm.remark"
+              /> </el-form-item></el-col
+        ></el-row>
 
-        <el-form-item label="退货备注" prop="remark">
-          <el-input
-            :disabled="isDetail"
-            type="textarea"
-            maxlength="250"
-            show-word-limit
-            placeholder="请填写备注"
-            v-model="ruleForm.remark"
-          />
-        </el-form-item>
-        <el-form-item label="仓库信息" :size="'mini'" required>
-          <el-table
-            :data="tableForm.product_go"
-            border
-            :size="'mini'"
-            row-key="key"
-            v-if="!isDetail"
-          >
-            <el-table-column
-              label="仓库名称"
-              min-width="300"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.wsm_supplier }}{{ scope.row.wsm_name }}
-              </template>
-            </el-table-column>
-            <el-table-column label="下单总数量" width="100" prop="num" />
-            <el-table-column label="已发货数量" width="100" prop="send_num" />
-            <el-table-column label="未发货数量" width="100" prop="wsend_num" />
-            <el-table-column label="退货数量" width="120">
-              <template slot-scope="scope">
-                <el-form-item style="margin: 0">
-                  <el-input
-                    :disabled="!scope.row.edit"
-                    :size="'mini'"
-                    v-model="scope.row.return_num"
-                  ></el-input>
-                </el-form-item>
-              </template>
-            </el-table-column>
-
-            <el-table-column fixed="right" label="操作" width="50">
-              <template slot-scope="scope">
-                <el-tooltip
-                  effect="dark"
-                  content="编辑"
-                  v-if="!scope.row.edit"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-edit tb-icon"
-                    @click="editRow(scope.$index, 0)"
-                  ></i>
-                </el-tooltip>
-
-                <el-tooltip
-                  effect="dark"
-                  content="保存"
-                  v-if="scope.row.edit"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-circle-check tb-icon"
-                    @click="checkRow(scope.$index, 0)"
-                  ></i>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-form-item>
         <el-form-item label="收货信息" :size="'mini'" required>
           <el-table
             :data="tableForm.get_product_go"
             border
             :size="'mini'"
             row-key="key"
+            max-height="300px"
           >
             <el-table-column
               label="收货人-联系电话-地址"
@@ -112,18 +57,23 @@
               prop="receipt_quantity"
               width="100"
             />
-            <el-table-column label="已发货数量" prop="send_num" width="100" />
-            <el-table-column label="未发货数量" prop="wsend_num" width="100" />
-            <el-table-column label="退货数量" width="120">
+
+            <el-table-column label="退货数量" width="150">
               <template slot-scope="scope">
                 <el-form-item style="margin: 0" :size="'mini'">
-                  <el-input
-                    :disabled="!scope.row.edit"
+                  <el-input-number
+                    size="mini"
                     v-model="scope.row.return_num"
-                  ></el-input>
+                    :disabled="!scope.row.edit"
+                    :min="0"
+                    :max="scope.row.wsend_num"
+                    :precision="0"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
+            <el-table-column label="未发货数量" prop="wsend_num" width="90" />
+            <el-table-column label="已发货数量" prop="send_num" width="90" />
 
             <el-table-column fixed="right" label="操作" width="50">
               <template slot-scope="scope">
@@ -157,8 +107,10 @@
       </el-form>
     </el-col>
     <el-col :span="24" style="text-align: right">
-      <el-button type="primary" @click="submitForm">保 存 </el-button>
-      <el-button @click="showModelThis = false" v-if="!isDetail"
+      <el-button type="primary" @click="submitForm" :size="'mini'"
+        >保 存
+      </el-button>
+      <el-button @click="showModelThis = false" v-if="!isDetail" :size="'mini'"
         >关 闭</el-button
       >
     </el-col>
@@ -200,7 +152,6 @@ export default {
         ],
       },
       tableForm: {
-        product_go: [],
         get_product_go: [],
       },
     };
@@ -234,15 +185,16 @@ export default {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
           const { info, addrs, orderCode } = this.sitem;
-          console.log(this.sitem)
-          let list =info&&info.length>0?JSON.parse(JSON.stringify(info)):[]; //
+          console.log(this.sitem);
+          let list =
+            info && info.length > 0 ? JSON.parse(JSON.stringify(info)) : []; //
           list.map((v) => {
             v.edit = false;
             v.return_num = v.return_num || "0";
             return v;
           });
-          this.tableForm.product_go = [].concat(...list);
-          let l_list =addrs&&addrs.length>0? JSON.parse(JSON.stringify(addrs)):[];
+          let l_list =
+            addrs && addrs.length > 0 ? JSON.parse(JSON.stringify(addrs)) : [];
           l_list.map((ele) => {
             ele.edit = false;
             ele.return_num = ele.return_num || "0";
@@ -254,7 +206,6 @@ export default {
             errorCode: "", //退货原因
           };
           this.tableForm = {
-            product_go: [].concat(...list),
             get_product_go: [].concat(...l_list),
           };
         }
@@ -266,24 +217,12 @@ export default {
         if (valid) {
           this.loading = true;
           let model = JSON.parse(JSON.stringify(this.ruleForm));
-          let arr = JSON.parse(JSON.stringify(this.tableForm.product_go));
           let arr1 = JSON.parse(JSON.stringify(this.tableForm.get_product_go));
           let wsm_code_edit = false,
             addr_edit = false,
             wsm_code_total = 0,
             addr_total = 0;
-          let list = [];
-          arr.forEach((e) => {
-            if (e.edit) {
-              wsm_code_edit = true;
-            }
-            let obj = {
-              wsm_code: e.wsm_code,
-              return_num: e.return_num,
-            };
-            wsm_code_total += e.return_num;
-            list.push(obj);
-          });
+
           let addr = [];
           arr1.forEach((e) => {
             if (e.edit) {
@@ -296,7 +235,6 @@ export default {
             addr_total += e.return_num;
             addr.push(obj);
           });
-          model.list = list;
           model.addr = addr;
           if (wsm_code_edit) {
             this.$message.warning("仓库信息正在编辑,请保存后再试!");
@@ -337,19 +275,6 @@ export default {
     },
     //保存某一行
     checkRow(rowIndex, type) {
-      if (type === 0) {
-        const { wsend_num, return_num } = this.tableForm.product_go[rowIndex];
-        if (!isnumber(return_num)) {
-          this.$message.warning("退货数量不规范!");
-          return;
-        }
-        if (parseInt(wsend_num) < parseInt(return_num)) {
-          this.$message.warning("退货数量不能大于未发货总数量!");
-          return;
-        }
-        this.tableForm.product_go[rowIndex].edit = false;
-      }
-
       if (type === 1) {
         const { wsend_num, return_num } =
           this.tableForm.get_product_go[rowIndex];
@@ -366,11 +291,7 @@ export default {
     },
     //编辑某一行
     editRow(rowIndex, type) {
-      let list = JSON.parse(
-        JSON.stringify(
-          type === 0 ? this.tableForm.product_go : this.tableForm.get_product_go
-        )
-      );
+      let list = JSON.parse(JSON.stringify(this.tableForm.get_product_go));
       let index = list.findIndex((v) => {
         v.edit;
       });
@@ -378,12 +299,7 @@ export default {
         this.$message.warning("请完成其他行的编辑!");
         return;
       }
-
-      if (type === 0) {
-        this.tableForm.product_go[rowIndex].edit = true;
-      } else {
-        this.tableForm.get_product_go[rowIndex].edit = true;
-      }
+      this.tableForm.get_product_go[rowIndex].edit = true;
     },
   },
 };