소스 검색

Merge branch 'new' into develop

# Conflicts:
#	src/views/deposit_home/components/deposit-apply-surrender.vue
#	src/views/supply/apply/apply_list.vue
#	src/views/supply/apply/engin_list.vue
#	src/views/supply/deliver/commerce_list.vue
#	src/views/supply/deliver/sum_list.vue
#	src/views/supply/pickup/sum_list.vue
howie 2 년 전
부모
커밋
13071902db
31개의 변경된 파일8141개의 추가작업 그리고 3115개의 파일을 삭제
  1. 83 30
      src/api/supply/purchase.js
  2. 6 2
      src/store/getters.js
  3. 15 6
      src/store/modules/user.js
  4. 14 3
      src/styles/element-ui.scss
  5. 421 7
      src/views/basic_data/stock/Issue_list.vue
  6. 196 188
      src/views/basic_data/stock/material_list.vue
  7. 8 8
      src/views/basic_data/stock/product_list.vue
  8. 416 7
      src/views/basic_data/stock/warehousing_list.vue
  9. 12 34
      src/views/deposit_home/components/deposit-apply-surrender.vue
  10. 352 129
      src/views/finance/rebate_form.vue
  11. 177 33
      src/views/login/index.vue
  12. 345 122
      src/views/setting/other.vue
  13. 190 136
      src/views/setting/sub_account.vue
  14. 1 3
      src/views/supply/apply/apply_list.vue
  15. 25 4
      src/views/supply/apply/engin_list.vue
  16. 1 3
      src/views/supply/deliver/commerce_list.vue
  17. 470 139
      src/views/supply/deliver/home_list.vue
  18. 106 71
      src/views/supply/deliver/sum_list.vue
  19. 530 177
      src/views/supply/engin/commerce_list.vue
  20. 667 190
      src/views/supply/engin/components/commerce_detail.vue
  21. 278 109
      src/views/supply/engin/components/commerce_examine.vue
  22. 612 202
      src/views/supply/engin/components/commerce_form.vue
  23. 284 112
      src/views/supply/engin/components/commerce_return.vue
  24. 210 105
      src/views/supply/engin/components/engin_detail.vue
  25. 481 182
      src/views/supply/engin/components/engin_examine.vue
  26. 295 278
      src/views/supply/engin/components/engin_form.vue
  27. 643 158
      src/views/supply/engin/components/home_detail.vue
  28. 238 228
      src/views/supply/engin/engin_list.vue
  29. 27 60
      src/views/supply/pickup/sum_list.vue
  30. 428 232
      src/views/supply/policy/components/retail_detail.vue
  31. 610 157
      src/views/supply/retail/components/retail_detail.vue

+ 83 - 30
src/api/supply/purchase.js

@@ -1,64 +1,117 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 获取采购单列表
 export function getPurchaseList(params) {
   return request({
-    url: '/purchaseOrder/list',
-    method: 'get',
-    params
-  })
+    url: "/purchaseOrder/list",
+    method: "get",
+    params,
+  });
 }
 
 // 获取采购单列表
 export function getPurchaseDetail(params) {
   return request({
-    url: '/purchaseOrder/detail',
-    method: 'get',
-    params
-  })
+    url: "/purchaseOrder/detail",
+    method: "get",
+    params,
+  });
 }
 
 // 获取采购入库单列表
 export function getEnterList(params) {
   return request({
-    url: '/purchaseStockIn/list',
-    method: 'get',
-    params
-  })
+    url: "/purchaseStockIn/list",
+    method: "get",
+    params,
+  });
 }
 
 // 获取采购入库单列表
 export function getEnterDetail(params) {
   return request({
-    url: '/purchaseStockIn/detail',
-    method: 'get',
-    params
-  })
+    url: "/purchaseStockIn/detail",
+    method: "get",
+    params,
+  });
 }
 
 // 获取采购计划单列表
 export function getPlanList(params) {
   return request({
-    url: '/plan/list',
-    method: 'get',
-    params
-  })
+    url: "/plan/list",
+    method: "get",
+    params,
+  });
 }
 
 // 获取经销商采购计划单汇总列表
 export function getSumList(params) {
   return request({
-    url: '/plan/listCustomer',
-    method: 'get',
-    params
-  })
+    url: "/plan/listCustomer",
+    method: "get",
+    params,
+  });
 }
 
 // 提交经销商采购计划单
 export function submitPlan(params) {
   return request({
-    url: '/plan/submitPlan',
-    method: 'post',
-    data: params
-  })
-}
+    url: "/plan/submitPlan",
+    method: "post",
+    data: params,
+  });
+}
+
+// 采购退料列表
+export function getPurchaseOutList(params) {
+  return request({
+    url: "/stock/orderOutIn/listPurchaseOrderOut",
+    method: "get",
+    params,
+  });
+}
+
+// 其他入库列表
+export function getOtherStockInList(params) {
+  return request({
+    url: "/stock/orderOutIn/listOtherStockIn",
+    method: "get",
+    params,
+  });
+}
+
+// 其他出库列表
+export function getOtherStockOutList(params) {
+  return request({
+    url: "/stock/orderOutIn/listOtherStockOut",
+    method: "get",
+    params,
+  });
+}
+
+// 反审其他出库单
+export function setApprovalOtherStockOut(params) {
+  return request({
+    url: "/stock/orderOutIn/trialApprovalOtherStockOut",
+    method: "post",
+    params,
+  });
+}
+// 反审其他入库单
+export function setApprovalPurchaseOrderIn(params) {
+  return request({
+    url: "/stock/orderOutIn/trialApprovalOtherStockIn",
+    method: "post",
+    params,
+  });
+}
+
+// 反审采购退料单
+export function setApprovalPurchaseOrderOut(params) {
+  return request({
+    url: "/stock/orderOutIn/trialApprovalPurchaseOrderOut",
+    method: "post",
+    params,
+  });
+}

+ 6 - 2
src/store/getters.js

@@ -7,13 +7,17 @@ const getters = {
   userid: (state) => state.user.userid,
   phone: (state) => state.user.phone,
   name: (state) => state.user.name,
-  isNotice:(state) =>state.user.isNotice,
+  isNotice: (state) => state.user.isNotice,
   menus: (state) => state.user.menus,
+  websitNumber: (state) => state.user.websitNumber,
   customerId: (state) => state.user.customerId,
   customerName: (state) => state.user.customerName,
   customerNumber: (state) => state.user.customerNumber,
   showMessages: (state) => state.user.showMessages,
   code: (state) => state.sales.code,
-  isCustomer:state => state.user.customerId  && state.user.customerName &&  state.user.customerNumber
+  isCustomer: (state) =>
+    state.user.customerId &&
+    state.user.customerName &&
+    state.user.customerNumber,
 };
 export default getters;

+ 15 - 6
src/store/modules/user.js

@@ -20,7 +20,8 @@ const getDefaultState = () => {
     customerName: "", //经销商名称
     customerNumber: "", //经销商编码
     showMessages: null, //
-    isNotice:false
+    isNotice: false,
+    websitNumber: "",
   };
 };
 
@@ -30,8 +31,8 @@ const mutations = {
   RESET_STATE: (state) => {
     Object.assign(state, getDefaultState());
   },
-  SET_STATUS(state,status){
-    state.isNotice = status
+  SET_STATUS(state, status) {
+    state.isNotice = status;
   },
   SET_USERID: (state, userid) => {
     state.userid = userid;
@@ -57,13 +58,15 @@ const mutations = {
   SET_CUSTOMERNUMBER: (state, customerNumber) => {
     state.customerNumber = customerNumber;
   },
+  SET_WEBSIT_NUMBER: (state, websitNumber) => {
+    state.websitNumber = websitNumber;
+  },
   showMessage: (state, value) => {
     if (value == "yes") {
       state.showMessages = true;
     } else {
       state.showMessages = false;
-      state.isNotice = true
-
+      state.isNotice = true;
     }
   },
 };
@@ -103,12 +106,13 @@ const actions = {
       getInfo(state.userid)
         .then((response) => {
           const { data } = response;
-          console.log(1111111, data);
+          console.log(1111111, response);
 
           if (!data) {
             return reject("Verification failed, please Login again.");
           }
           console.log(data);
+          let websitNumber;
           const {
             nickName,
             userName,
@@ -117,6 +121,10 @@ const actions = {
             customerNumber,
           } = data;
 
+          if (data.adminWebsit) {
+            websitNumber = data.adminWebsit.websitNumber;
+            commit("SET_WEBSIT_NUMBER", websitNumber);
+          }
           // 模拟请求数据
           // const menus = [
           // {
@@ -147,6 +155,7 @@ const actions = {
           commit("SET_CUSTOMERNUMBER", customerNumber);
           commit("SET_NAME", nickName);
           commit("SET_PHONE", userName);
+
           // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex
 
           localStorage.setItem("supply_user", JSON.stringify(data));

+ 14 - 3
src/styles/element-ui.scss

@@ -15,7 +15,6 @@
   display: none;
 }
 
-
 // to fixed https://github.com/ElemeFE/element/issues/2461
 .el-dialog {
   transform: none;
@@ -35,11 +34,23 @@
     }
   }
 }
-
+//  防止浏览器缩放搜索模块布局错位
+.el-range-editor--mini.el-input__inner {
+  display: -webkit-inline-box;
+  display: -ms-inline-flexbox;
+  display: inline-flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  padding: 2px 10px !important;
+}
+.el-range-editor--mini.el-input__inner {
+  height: 28px !important;
+}
 // dropdown
 .el-dropdown-menu {
   a {
-    display: block
+    display: block;
   }
 }
 

+ 421 - 7
src/views/basic_data/stock/Issue_list.vue

@@ -1,14 +1,428 @@
 <template>
-  <!--  出库单-->
-  <div />
+  <!--  退料单-->
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
+        <template #right_btn> </template>
+        <template #search> </template>
+      </Collapse>
+      <el-form
+        ref="screenForm"
+        :model="screenForm"
+        label-width="70px"
+        size="mini"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据编号" prop="billNo">
+              <el-input
+                v-model="screenForm.billNo"
+                placeholder="请输入单据编号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品名称" prop="materialName">
+              <el-input
+                v-model="screenForm.materialName"
+                placeholder="请输入产品名称"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="物料编码" prop="materialNumber">
+              <el-input
+                v-model="screenForm.materialNumber"
+                placeholder="请输入物料编码"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="日期" prop="date">
+              <el-date-picker
+                v-model="screenForm.date"
+                type="datetimerange"
+                range-separator="至"
+                style="width: 100%"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              />
+            </el-form-item>
+          </el-col>
+          <!--          <el-col :xs="24" :sm="12" :lg="6">-->
+          <!--            <el-form-item label="货主" prop="company">-->
+          <!--              <el-input-->
+          <!--                v-model="screenForm.company"-->
+          <!--                placeholder="请输入供货单位"-->
+          <!--              />-->
+          <!--            </el-form-item>-->
+          <!--          </el-col>-->
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="仓库" prop="correspondId">
+              <el-select
+                v-model="screenForm.correspondId"
+                multiple
+                style="width: 100%"
+                placeholder="请选择仓库"
+                size="mini"
+                filterable
+                clearable
+              >
+                <el-option
+                  v-for="(item, index) in warehouseList"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-form-item>
+              <el-button size="mini" @click="resetScreenForm">清空</el-button>
+              <el-button size="mini" type="primary" @click="submitScreenForm"
+                >搜索</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <!--        <div class="fr">-->
+        <!--          <ExportButton-->
+        <!--            :ex-url="'admin/user/mch/export'"-->
+        <!--            :ex-params="exParams"-->
+        <!--          />-->
+        <!--        </div>-->
+      </div>
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+          show-summary
+          :summary-method="$getSummaries"
+        >
+          <el-table-column
+            label="序号"
+            align="left"
+            width="50"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+
+          <el-table-column
+            align="left"
+            label="单据编号"
+            prop="billNo"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.billNo" />
+              <span>{{ scope.row.billNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="库存方向"
+            prop="stockId"
+            min-width="100"
+            show-overflow-tooltip
+          >
+            <template v-slot="scope">
+              {{ "普通" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="退料日期"
+            prop="fdate"
+            min-width="120"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.fdate | dateToDayFilter }}
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="left"
+            label="单据状态"
+            prop="fdDocumentStatus"
+            min-width="120"
+            show-overflow-tooltip
+          >
+            <template v-slot="scope">
+              {{ scope.row.fdDocumentStatus === "C" ? "已审核" : "" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="入库类型"
+            min-width="100"
+            show-overflow-tooltip
+          >
+            <template v-slot="scope">
+              {{ "其他入库" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="产品编码"
+            prop="materialOldNumber"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialOldNumber" />
+              <span>{{ scope.row.materialOldNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="物料编码"
+            prop="materialNumber"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialNumber" />
+              <span>{{ scope.row.materialNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="产品名称"
+            prop="materialName"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="规格型号"
+            prop="specification"
+            min-width="300"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.specification" />
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="单位"
+            prop="unit"
+            min-width="100"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            align="right"
+            label="实收数量"
+            prop="qty"
+            min-width="100"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="收货仓库"
+            prop="stockName"
+            min-width="100"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            label="操作"
+            width="100"
+            fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-popconfirm
+                title="弃审吗?"
+                @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)"
+              >
+                <el-button slot="reference" type="text">弃审</el-button>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
+import {
+  getOtherStockInList,
+  setApprovalPurchaseOrderIn,
+} from "@/api/supply/purchase";
+import { getWarehouseList } from "@/api/supply/apply";
+
 export default {
-  name: 'IssueList'
-}
-</script>
+  name: "MaterialList",
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: {
+        billNo: "",
+        correspondId: [],
+        endTime: "",
+        materialName: "",
+        date: "",
+        materialNumber: "",
+        materialOldNumber: "",
+        specification: "",
+        startTime: "",
+      },
+      isCollapse: true,
+      warehouseList: [],
+    };
+  },
+  computed: {
+    exParams() {
+      return {
+        billNo: this.screenForm.billNo,
+        correspondId: this.screenForm.correspondId.join(","),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        materialName: this.screenForm.materialName,
+        materialNumber: this.screenForm.materialNumber,
+        materialOldNumber: this.screenForm.materialOldNumber,
+        specification: this.screenForm.specification,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+      };
+    },
+    isShowDetail() {
+      // eslint-disable-next-line no-prototype-builtins
+      return this.queryItem.hasOwnProperty("id");
+    },
+  },
+  created() {
+    this.getWarehouseList();
+    this.getList();
+  },
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true;
+    },
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1,
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      });
+    },
+    handleUnapprove(id, billNo) {
+      setApprovalPurchaseOrderIn({ id, billNo }).then((res) => {
+        this.$successMsg("弃审成功");
+        this.getList();
+      });
+    },
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        billNo: this.screenForm.billNo,
+        correspondId: this.screenForm.correspondId.join(","),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        materialName: this.screenForm.materialName,
+        materialNumber: this.screenForm.materialNumber,
+        materialOldNumber: this.screenForm.materialOldNumber,
+        specification: this.screenForm.specification,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+      };
+      getOtherStockInList(params).then((res) => {
+        res.data.records.forEach((item) => {
+          item.sums1 = ["auxUnitQty"];
+          item.sums2 = ["taxPrice", "amount", "entryTaxAmount", "allAmount"];
+        });
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
 
-<style scoped>
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+    },
+
+    backList() {
+      this.queryItem = {};
+    },
+  },
+};
+</script>
 
-</style>
+<style scoped></style>

+ 196 - 188
src/views/basic_data/stock/material_list.vue

@@ -1,8 +1,12 @@
 <template>
   <!--  退料单-->
-  <div>
+  <div class="app-container">
     <!-- 筛选条件 -->
     <div class="screen-container">
+      <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
+        <template #right_btn> </template>
+        <template #search> </template>
+      </Collapse>
       <el-form
         ref="screenForm"
         :model="screenForm"
@@ -12,31 +16,31 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="入库单号" prop="orderNum">
+            <el-form-item label="单据编号" prop="billNo">
               <el-input
-                v-model="screenForm.orderNum"
-                placeholder="请输入入库单号"
+                v-model="screenForm.billNo"
+                placeholder="请输入单据编号"
               />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品名称" prop="chName">
+            <el-form-item label="产品名称" prop="materialName">
               <el-input
-                v-model="screenForm.chName"
+                v-model="screenForm.materialName"
                 placeholder="请输入产品名称"
               />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品编码" prop="chNum">
+            <el-form-item label="物料编码" prop="materialNumber">
               <el-input
-                v-model="screenForm.chNum"
-                placeholder="请输入产品编码"
+                v-model="screenForm.materialNumber"
+                placeholder="请输入物料编码"
               />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="入库日期" prop="date">
+            <el-form-item label="退料日期" prop="date">
               <el-date-picker
                 v-model="screenForm.date"
                 type="datetimerange"
@@ -49,32 +53,53 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="供货单位" prop="company">
+            <el-form-item label="供应商" prop="supplierName">
               <el-input
-                v-model="screenForm.company"
+                v-model="screenForm.supplierName"
                 placeholder="请输入供货单位"
               />
             </el-form-item>
           </el-col>
-
-          <el-col :xs="24" :sm="12" :lg="18" class="tr">
-            <el-form-item label="">
-              <el-button @click="resetScreenForm">清空</el-button>
-              <el-button
-                type="primary"
-                @click="submitScreenForm"
-              >搜索</el-button>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="仓库" prop="correspondId">
+              <el-select
+                v-model="screenForm.correspondId"
+                multiple
+                style="width: 100%"
+                placeholder="请选择仓库"
+                size="mini"
+                filterable
+                clearable
+              >
+                <el-option
+                  v-for="(item, index) in warehouseList"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="12" class="tr">
+            <el-form-item>
+              <el-button size="mini" @click="resetScreenForm">清空</el-button>
+              <el-button size="mini" type="primary" @click="submitScreenForm"
+                >搜索</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
     </div>
     <div class="mymain-container">
-      <div class="btn-group clearfix">
-        <div class="fr">
-          <ExportButton :ex-url="'admin/user/mch/export'" :ex-params="exParams" />
-        </div>
-      </div>
+      <!--      <div class="btn-group clearfix">-->
+      <!--        <div class="fr">-->
+      <!--          <ExportButton-->
+      <!--            :ex-url="'admin/user/mch/export'"-->
+      <!--            :ex-params="exParams"-->
+      <!--          />-->
+      <!--        </div>-->
+      <!--      </div>-->
       <div class="table">
         <el-table
           v-loading="listLoading"
@@ -84,12 +109,18 @@
           fit
           highlight-current-row
           stripe
-          show-summary
-          :summary-method="$getSummaries"
         >
           <el-table-column
+            label="序号"
             align="left"
-            label="入库单号"
+            width="50"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+
+          <el-table-column
+            align="left"
+            label="单据编号"
             prop="billNo"
             min-width="130"
             show-overflow-tooltip
@@ -101,53 +132,35 @@
           </el-table-column>
           <el-table-column
             align="left"
-            label="入库日期"
+            label="退料日期"
             prop="fdate"
-            min-width="120"
+            min-width="150"
             show-overflow-tooltip
           >
-            <template slot-scope="scope">
-              {{ scope.row.fdate | dateToDayFilter }}
-            </template>
           </el-table-column>
           <el-table-column
             align="left"
-            label="仓库"
-            prop="stockId"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="供货单位"
-            prop="supplyName"
+            label="供货商"
+            prop="supplierName"
             min-width="200"
             show-overflow-tooltip
           />
           <el-table-column
             align="left"
-            label="审核日期"
-            prop="approveDate"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialNumber"
+            label="单据状态"
+            prop="fdDocumentStatus"
             min-width="120"
             show-overflow-tooltip
           >
-            <template slot-scope="scope">
-              <CopyButton :copy-text="scope.row.materialNumber" />
-              <span>{{ scope.row.materialNumber }}</span>
+            <template v-slot="scope">
+              {{ scope.row.fdDocumentStatus === "C" ? "已审核" : "" }}
             </template>
           </el-table-column>
           <el-table-column
             align="left"
             label="产品编码"
             prop="materialOldNumber"
-            min-width="140"
+            min-width="200"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
@@ -157,114 +170,73 @@
           </el-table-column>
           <el-table-column
             align="left"
-            label="产品名称"
-            prop="materialName"
-            min-width="160"
+            label="物料编码"
+            prop="materialNumber"
+            min-width="200"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <CopyButton :copy-text="scope.row.materialName" />
-              <span>{{ scope.row.materialName }}</span>
+              <CopyButton :copy-text="scope.row.materialNumber" />
+              <span>{{ scope.row.materialNumber }}</span>
             </template>
           </el-table-column>
           <el-table-column
             align="left"
-            label="规格型号"
-            prop="uom"
-            min-width="350"
+            label="产品名称"
+            prop="materialName"
+            min-width="200"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <CopyButton :copy-text="scope.row.uom" />
-              <span>{{ scope.row.uom }}</span>
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
           <el-table-column
             align="left"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="right"
-            label="数量"
-            prop="realQty"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="right"
-            label="原币含税单价"
-            prop="taxPrice"
-            min-width="120"
-            show-overflow-tooltip
-          >
-            <template slot-scope="scope">
-              {{ scope.row.taxPrice | numToFixed }}
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="right"
-            label="原币金额"
-            prop="amount"
-            min-width="100"
+            label="规格型号"
+            prop="materialName"
+            min-width="300"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              {{ scope.row.amount | numToFixed }}
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
           <el-table-column
-            align="right"
-            label="原币税额"
-            prop="entryTaxAmount"
+            align="left"
+            label="库存单位"
+            prop="unit"
             min-width="100"
             show-overflow-tooltip
           >
-            <template slot-scope="scope">
-              {{ scope.row.entryTaxAmount | numToFixed }}
-            </template>
           </el-table-column>
           <el-table-column
             align="right"
-            label="原币价税合计"
-            prop="allAmount"
-            min-width="120"
-            show-overflow-tooltip
-          >
-            <template slot-scope="scope">
-              {{ scope.row.allAmount | numToFixed }}
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="left"
-            label="税率"
-            prop="entryTaxRate"
+            label="实退数量"
+            prop="qty"
             min-width="100"
             show-overflow-tooltip
           />
           <el-table-column
-            align="left"
-            label="制单人"
-            prop="createBy"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="审核人"
-            prop="approverId"
+            align="right"
+            label="仓库"
+            prop="stockName"
             min-width="100"
             show-overflow-tooltip
           />
-          <el-table-column
-            align="left"
-            label="备注"
-            prop="abcdRemarks"
-            min-width="160"
-            show-overflow-tooltip
-          />
+          <!--          <el-table-column-->
+          <!--            align="right"-->
+          <!--            label="开票状态"-->
+          <!--            prop="taxPrice"-->
+          <!--            min-width="120"-->
+          <!--            show-overflow-tooltip-->
+          <!--          >-->
+          <!--            <template slot-scope="scope">-->
+          <!--              {{ scope.row.taxPrice | numToFixed }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
           <el-table-column
             align="center"
             label="操作"
@@ -272,10 +244,12 @@
             fixed="right"
           >
             <template slot-scope="scope">
-              <el-button
-                type="text"
-                @click="toDetail(scope.row)"
-              >详情</el-button>
+              <el-popconfirm
+                title="弃审吗?"
+                @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)"
+              >
+                <el-button slot="reference" type="text">弃审</el-button>
+              </el-popconfirm>
             </template>
           </el-table-column>
         </el-table>
@@ -298,10 +272,14 @@
 </template>
 
 <script>
-import { getEnterList } from '@/api/supply/purchase'
+import {
+  getPurchaseOutList,
+  setApprovalPurchaseOrderOut,
+} from "@/api/supply/purchase";
+import { getWarehouseList } from "@/api/supply/apply";
 
 export default {
-  name: 'MaterialList',
+  name: "MaterialList",
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -309,30 +287,44 @@ export default {
       listTotal: 0, // 列表总数
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        orderNum: '',
-        chName: '',
-        chNum: '',
-        date: '',
-        company: ''
-      }
-    }
+      screenForm: {
+        billNo: "",
+        correspondId: [],
+        endTime: "",
+        date: "",
+        materialName: "",
+        materialNumber: "",
+        materialOldNumber: "",
+        specification: "",
+        startTime: "",
+        supplierName: "",
+      },
+      isCollapse: true,
+      warehouseList: [],
+    };
   },
   computed: {
     exParams() {
       return {
-        billNo: this.screenForm.orderNum,
-        materialName: this.screenForm.chName,
-        materialCode: this.screenForm.chNum,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        supplyName: this.screenForm.company
-      }
+        billNo: this.screenForm.billNo,
+        correspondId: this.screenForm.correspondId.join(","),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        materialName: this.screenForm.materialName,
+        materialNumber: this.screenForm.materialNumber,
+        materialOldNumber: this.screenForm.materialOldNumber,
+        specification: this.screenForm.specification,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        supplierName: this.screenForm.supplierName,
+      };
     },
     isShowDetail() {
       // eslint-disable-next-line no-prototype-builtins
-      return this.queryItem.hasOwnProperty('id')
-    }
+      return this.queryItem.hasOwnProperty("id");
+    },
+  },
+  created() {
+    this.getWarehouseList();
+    this.getList();
   },
   methods: {
     // 查询按钮权限
@@ -341,71 +333,87 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0;
-      return true
+      return true;
+    },
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1,
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      });
+    },
+    handleUnapprove(id, billNo) {
+      setApprovalPurchaseOrderOut({ id, billNo }).then((res) => {
+        this.$successMsg("弃审成功");
+        this.getList();
+      });
     },
-
     // 查询列表
     getList() {
-      this.listLoading = true
+      this.listLoading = true;
 
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        billNo: this.screenForm.orderNum,
-        materialName: this.screenForm.chName,
-        materialCode: this.screenForm.chNum,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        supplyName: this.screenForm.company
-      }
-      getEnterList(params).then((res) => {
-        res.data.records.forEach(item => {
-          item.sums1 = ['auxUnitQty']
-          item.sums2 = ['taxPrice', 'amount', 'entryTaxAmount', 'allAmount']
-        })
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
+        billNo: this.screenForm.billNo,
+        correspondId: this.screenForm.correspondId.join(","),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        materialName: this.screenForm.materialName,
+        materialNumber: this.screenForm.materialNumber,
+        materialOldNumber: this.screenForm.materialOldNumber,
+        specification: this.screenForm.specification,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        supplierName: this.screenForm.supplierName,
+      };
+      getPurchaseOutList(params).then((res) => {
+        res.data.records.forEach((item) => {
+          item.sums1 = ["auxUnitQty"];
+          item.sums2 = ["taxPrice", "amount", "entryTaxAmount", "allAmount"];
+        });
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1
-      this.getList()
+      this.currentPage = 1;
+      this.getList();
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields()
-      this.currentPage = 1
-      this.getList()
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
+      this.currentPage = val;
+      this.getList();
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item
+      this.queryItem = item;
     },
 
     backList() {
-      this.queryItem = {}
-    }
-  }
-
-}
+      this.queryItem = {};
+    },
+  },
+};
 </script>
 
 <style scoped></style>

+ 8 - 8
src/views/basic_data/stock/product_list.vue

@@ -46,14 +46,14 @@
 
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="仓库" prop="correspondId">
-              <el-select v-model="screenForm.correspondId" multiple  style="width: 100%" placeholder="请选择仓库" size="mini" filterable clearable>
+              <el-select v-model="screenForm.correspondId" multiple style="width: 100%" placeholder="请选择仓库" size="mini" filterable clearable>
                 <el-option v-for="(item, index) in warehouseList" :key="index" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="存货类别" >
-              <el-select v-model="screenForm.categoryId" style="width: 100%" placeholder="选择存货类别" filterable clearable>
+            <el-form-item label="存货类别" prop="categoryId">
+              <el-select v-model="screenForm.categoryId" style="width: 100%" placeholder="选择存货类别" filterable clearable multiple>
                 <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -70,7 +70,7 @@
     </div>
     <div class="mymain-container">
       <div class="btn-group clearfix">
-        <div >
+        <div>
           <ExportButton
             :ex-url="'/stock/manager/exportStockToDay'"
             :ex-params="exParams"
@@ -94,7 +94,7 @@
             min-width="100"
             show-overflow-tooltip
           />
-            <el-table-column
+          <el-table-column
             align="left"
             label="存货类别"
             prop="categoryName"
@@ -204,7 +204,7 @@ export default {
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
       screenForm: {
-        categoryId: '',
+        categoryId: [],
         correspondId: [],
         materialName: '',
         materialNumber: '',
@@ -220,7 +220,7 @@ export default {
   computed: {
     exParams() {
       return {
-        categoryId: this.screenForm.categoryId,
+        categoryId: this.screenForm.categoryId.join(','),
         correspondId: this.screenForm.correspondId.join(','),
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
@@ -238,7 +238,7 @@ export default {
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        categoryId: this.screenForm.categoryId,
+        categoryId: this.screenForm.categoryId.join(','),
         correspondId: this.screenForm.correspondId.join(','),
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,

+ 416 - 7
src/views/basic_data/stock/warehousing_list.vue

@@ -1,14 +1,423 @@
 <template>
-  <!--  入库单-->
-  <div />
+  <!--  退料单-->
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
+        <template #right_btn> </template>
+        <template #search> </template>
+      </Collapse>
+      <el-form
+        ref="screenForm"
+        :model="screenForm"
+        label-width="70px"
+        size="mini"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据编号" prop="billNo">
+              <el-input
+                v-model="screenForm.billNo"
+                placeholder="请输入单据编号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品名称" prop="materialName">
+              <el-input
+                v-model="screenForm.materialName"
+                placeholder="请输入产品名称"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="物料编码" prop="materialNumber">
+              <el-input
+                v-model="screenForm.materialNumber"
+                placeholder="请输入物料编码"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="日期" prop="date">
+              <el-date-picker
+                v-model="screenForm.date"
+                type="datetimerange"
+                range-separator="至"
+                style="width: 100%"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              />
+            </el-form-item>
+          </el-col>
+          <!--          <el-col :xs="24" :sm="12" :lg="6">-->
+          <!--            <el-form-item label="货主" prop="company">-->
+          <!--              <el-input-->
+          <!--                v-model="screenForm.company"-->
+          <!--                placeholder="请输入供货单位"-->
+          <!--              />-->
+          <!--            </el-form-item>-->
+          <!--          </el-col>-->
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="仓库" prop="correspondId">
+              <el-select
+                v-model="screenForm.correspondId"
+                multiple
+                style="width: 100%"
+                placeholder="请选择仓库"
+                size="mini"
+                filterable
+                clearable
+              >
+                <el-option
+                  v-for="(item, index) in warehouseList"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-form-item>
+              <el-button size="mini" @click="resetScreenForm">清空</el-button>
+              <el-button size="mini" type="primary" @click="submitScreenForm"
+                >搜索</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <!--        <div class="fr">-->
+        <!--          <ExportButton-->
+        <!--            :ex-url="'admin/user/mch/export'"-->
+        <!--            :ex-params="exParams"-->
+        <!--          />-->
+        <!--        </div>-->
+      </div>
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+          show-summary
+          :summary-method="$getSummaries"
+        >
+          <el-table-column
+            label="序号"
+            align="left"
+            width="50"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+
+          <el-table-column
+            align="left"
+            label="库存方向"
+            prop="billNo"
+            min-width="120"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ "普通" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="单据状态"
+            prop="fdDocumentStatus"
+            min-width="120"
+            show-overflow-tooltip
+          >
+            <template v-slot="scope">
+              {{ scope.row.fdDocumentStatus === "C" ? "已审核" : "" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="业务类型"
+            prop="fdate"
+            min-width="120"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ "物料领用" }}
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="left"
+            label="单据编号"
+            prop="billNo"
+            min-width="200"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="日期"
+            prop="fdate"
+            min-width="150"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="产品编码"
+            prop="materialOldNumber"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialOldNumber" />
+              <span>{{ scope.row.materialOldNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="物料编码"
+            prop="materialNumber"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialNumber" />
+              <span>{{ scope.row.materialNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="产品名称"
+            prop="materialOldNumber"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="规格型号"
+            prop="specification"
+            min-width="300"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.specification" />
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="单位"
+            prop="unit"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="实发数量"
+            prop="qty"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="发货仓库"
+            prop="stockName"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <!--          <el-table-column-->
+          <!--            align="left"-->
+          <!--            label="货主"-->
+          <!--            prop="uom"-->
+          <!--            min-width="100"-->
+          <!--            show-overflow-tooltip-->
+          <!--          />-->
+          <el-table-column
+            align="center"
+            label="操作"
+            width="100"
+            fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-popconfirm
+                title="弃审吗?"
+                @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)"
+              >
+                <el-button slot="reference" type="text">弃审</el-button>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
+import {
+  getOtherStockOutList,
+  setApprovalOtherStockOut,
+} from "@/api/supply/purchase";
+import { getWarehouseList } from "@/api/supply/apply";
+
 export default {
-  name: 'WarehousingList'
-}
-</script>
+  name: "MaterialList",
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: {
+        billNo: "",
+        correspondId: [],
+        endTime: "",
+        date: "",
+        materialName: "",
+        materialNumber: "",
+        materialOldNumber: "",
+        specification: "",
+        startTime: "",
+      },
+      isCollapse: true,
+      warehouseList: [],
+    };
+  },
+  computed: {
+    exParams() {
+      return {
+        billNo: this.screenForm.billNo,
+        correspondId: this.screenForm.correspondId.join(","),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        materialName: this.screenForm.materialName,
+        materialNumber: this.screenForm.materialNumber,
+        materialOldNumber: this.screenForm.materialOldNumber,
+        specification: this.screenForm.specification,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+      };
+    },
+    isShowDetail() {
+      // eslint-disable-next-line no-prototype-builtins
+      return this.queryItem.hasOwnProperty("id");
+    },
+  },
+  created() {
+    this.getWarehouseList();
+    this.getList();
+  },
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true;
+    },
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1,
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      });
+    },
+    handleUnapprove(id, billNo) {
+      setApprovalOtherStockOut({ id, billNo }).then((res) => {
+        this.$successMsg("弃审成功");
+        this.getList();
+      });
+    },
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        billNo: this.screenForm.billNo,
+        correspondId: this.screenForm.correspondId.join(","),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        materialName: this.screenForm.materialName,
+        materialNumber: this.screenForm.materialNumber,
+        materialOldNumber: this.screenForm.materialOldNumber,
+        specification: this.screenForm.specification,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+      };
+      getOtherStockOutList(params).then((res) => {
+        res.data.records.forEach((item) => {
+          item.sums1 = ["auxUnitQty"];
+          item.sums2 = ["taxPrice", "amount", "entryTaxAmount", "allAmount"];
+        });
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
 
-<style scoped>
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+    },
+
+    backList() {
+      this.queryItem = {};
+    },
+  },
+};
+</script>
 
-</style>
+<style scoped></style>

+ 12 - 34
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -294,10 +294,10 @@
           >
             <template slot-scope="scope">
               <el-input
-                v-model.number.trim="scope.row.dataQty"
+                v-model.number="scope.row.dataQty"
                 class="inpt"
                 size="mini"
-
+                clearable
                 @blur="setDataQty($event,scope.row)"
               />
             </template>
@@ -598,7 +598,7 @@ export default {
 
     // 计算收差金额
     setDataQty(e, row) {
-      if (!row.dataQty) return row.dataQty = 0
+      if (!row.dataQty) return
       row.saleTypeId = this.details.saleTypeId
       computeDiff(row).then(res => {
         row.diffAmount = res.data.diffAmount
@@ -642,37 +642,15 @@ export default {
           fileUrl: el.url
         })
       })
-
-      if (!this.details.items.every(e => e.dataQty)) {
-        this.$confirm(`上交资料为0,是否继续提交`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          applyDeposit({
-            ...this.details,
-            dataList: [...arr, ...this.details.dataList]
-          }).then((res) => {
-            this.$successMsg('申请成功')
-            this.$parent.showPage = 1
-            this.$parent.deduction = ''
-            this.$parent.getList()
-          })
-          return
-        }).catch(() => {
-
-        })
-      } else {
-        applyDeposit({
-          ...this.details,
-          dataList: [...arr, ...this.details.dataList]
-        }).then((res) => {
-          this.$successMsg('申请成功')
-          this.$parent.showPage = 1
-          this.$parent.deduction = ''
-          this.$parent.getList()
-        })
-      }
+      applyDeposit({
+        ...this.details,
+        dataList: [...arr, ...this.details.dataList]
+      }).then((res) => {
+        this.$successMsg('申请成功')
+        this.$parent.showPage = 1
+        this.$parent.deduction = ''
+        this.$parent.getList()
+      })
     },
     delFile(index) {
       this.details.dataList.splice(index, 1)

+ 352 - 129
src/views/finance/rebate_form.vue

@@ -4,7 +4,13 @@
     <el-divider />
     <!-- 表头 -->
     <div>
-      <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="mini"
+        label-position="left"
+      >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
@@ -13,7 +19,15 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
-              <el-date-picker v-model="searchForm.theTime" disabled class="selectStyle" type="datetime" placeholder="系统自动生成" default-time="23:59:59" value-format="yyyy-MM-dd HH:mm:ss" />
+              <el-date-picker
+                v-model="searchForm.theTime"
+                disabled
+                class="selectStyle"
+                type="datetime"
+                placeholder="系统自动生成"
+                default-time="23:59:59"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -23,7 +37,11 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
-              <el-input v-model="searchForm.createBy" disabled placeholder="请输入" />
+              <el-input
+                v-model="searchForm.createBy"
+                disabled
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
           <!-- <el-col :xs="24" :sm="12" :lg="6">
@@ -45,18 +63,38 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-popconfirm v-if="$checkBtnRole('del', $route.meta.roles)" title="这是一段内容确定删除吗?" @onConfirm="delSeletFn">
-          <el-button slot="reference" :disabled="selectList.length < 1" type="danger" size="mini" class="textColor delStyle" icon="el-icon-minus">批量删除</el-button>
+        <el-popconfirm
+          v-if="$checkBtnRole('del', $route.meta.roles)"
+          title="这是一段内容确定删除吗?"
+          @onConfirm="delSeletFn"
+        >
+          <el-button
+            slot="reference"
+            :disabled="selectList.length < 1"
+            type="danger"
+            size="mini"
+            class="textColor delStyle"
+            icon="el-icon-minus"
+            >批量删除</el-button
+          >
         </el-popconfirm>
       </div>
       <div class="fr">
-        <el-button type="primary" size="mini" @click="downLoadFn">模板</el-button>
+        <el-button type="primary" size="mini" @click="downLoadFn"
+          >模板</el-button
+        >
         <!-- <a href="/rebate/order/download">下载文件</a> -->
         <!-- <el-button type="primary" size="mini" @click="importFn"
           >批量导入</el-button
         > -->
 
-        <el-upload class="import-btn" action="" :http-request="handleImport" :file-list="importFileList" :show-file-list="false">
+        <el-upload
+          class="import-btn"
+          action=""
+          :http-request="handleImport"
+          :file-list="importFileList"
+          :show-file-list="false"
+        >
           <el-button type="primary" size="mini">批量导入</el-button>
         </el-upload>
       </div>
@@ -78,90 +116,267 @@
           @row-click="onRowClick"
           @selection-change="selectionChange"
         >
-          <el-table-column align="center" type="selection" width="51" show-overflow-tooltip />
-          <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="center"
+            type="selection"
+            width="51"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="经销商编码"
+            prop="customerNumber"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.customerNumber" style="width: 100%" size="mini" disabled />
+              <el-input
+                v-model="scope.row.customerNumber"
+                style="width: 100%"
+                size="mini"
+                disabled
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="经销商名称" prop="customerName" min-width="300" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="经销商名称"
+            prop="customerName"
+            min-width="300"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-select v-model="scope.row.customerId" style="width: 100%" size="mini" placeholder="请选择" filterable @change="changeCustomerFn($event, scope.$index, scope.row)">
-                <el-option v-for="item in customerData" :key="item.id" :label="item.name" :value="item.id" />
+              <el-select
+                v-model="scope.row.customerId"
+                style="width: 100%"
+                size="mini"
+                placeholder="请选择"
+                filterable
+                @change="changeCustomerFn($event, scope.$index, scope.row)"
+              >
+                <el-option
+                  v-for="item in customerData"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column align="left" label="返利类型" prop="customerWalletId" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="返利类型"
+            prop="customerWalletId"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-select v-model="scope.row.customerWalletId" style="width: 100%" size="mini" placeholder="请选择" filterable>
-                <el-option v-for="item in scope.row.walletList" :key="item.customerWalletId" :label="item.name" :value="item.customerWalletId" />
+              <el-select
+                v-model="scope.row.customerWalletId"
+                style="width: 100%"
+                size="mini"
+                placeholder="请选择"
+                filterable
+              >
+                <el-option
+                  v-for="item in scope.row.walletList"
+                  :key="item.customerWalletId"
+                  :label="item.name"
+                  :value="item.customerWalletId"
+                />
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column align="right" label="返利总金额" prop="amount" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="right"
+            label="返利总金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.amount" size="mini" style="width: 100%" class="mountclass" type="number" @mousewheel.native.prevent />
+              <el-input
+                v-model="scope.row.amount"
+                size="mini"
+                style="width: 100%"
+                class="mountclass"
+                type="number"
+                @mousewheel.native.prevent
+              />
             </template>
           </el-table-column>
-          <el-table-column align="right" label="暂扣返利" prop="withholdAmount" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="right"
+            label="暂扣返利"
+            prop="withholdAmount"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.withholdAmount" style="width: 100%" size="mini" class="mountclass" type="number" @mousewheel.native.prevent />
+              <el-input
+                v-model="scope.row.withholdAmount"
+                style="width: 100%"
+                size="mini"
+                class="mountclass"
+                type="number"
+                @mousewheel.native.prevent
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="政策文件流水号" prop="policyFileNo" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="政策文件流水号"
+            prop="policyFileNo"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.policyFileNo" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.policyFileNo"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="政策文号" prop="policyDocNo" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="政策文号"
+            prop="policyDocNo"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.policyDocNo" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.policyDocNo"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="政策年份" prop="policyYear" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="政策年份"
+            prop="policyYear"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.policyYear" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.policyYear"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="政策月份" prop="policyMonth" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="政策月份"
+            prop="policyMonth"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.policyMonth" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.policyMonth"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="政策归属部门" prop="policyOrg" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="政策归属部门"
+            prop="policyOrg"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.policyOrg" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.policyOrg"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="客户区域" prop="customerArea" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="客户区域"
+            prop="customerArea"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.customerArea" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.customerArea"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="客户属性" prop="customerAttr" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="客户属性"
+            prop="customerAttr"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.customerAttr" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.customerAttr"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="建立实际归属客户" prop="rewardActualCustomers" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="建立实际归属客户"
+            prop="rewardActualCustomers"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.rewardActualCustomers" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.rewardActualCustomers"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="备注1" prop="remark1" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="备注1"
+            prop="remark1"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.remark1" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.remark1"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="备注2" prop="remark2" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="备注2"
+            prop="remark2"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.remark2" style="width: 100%" size="mini" />
+              <el-input
+                v-model="scope.row.remark2"
+                style="width: 100%"
+                size="mini"
+              />
             </template>
           </el-table-column>
         </el-table>
       </div>
     </div>
-    <br>
+    <br />
 
     <!-- 按钮 -->
     <div class="btn-group clearfix">
@@ -173,16 +388,20 @@
         <el-button type="primary" size="mini" @click="cancelFn">重置</el-button>
       </div>
       <div class="fr">
-        <el-button type="primary" size="mini" @click="addRowFn">添加行</el-button>
-        <el-button type="primary" size="mini" @click="delRowFn">删除行</el-button>
+        <el-button type="primary" size="mini" @click="addRowFn"
+          >添加行</el-button
+        >
+        <el-button type="primary" size="mini" @click="delRowFn"
+          >删除行</el-button
+        >
       </div>
     </div>
   </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import { downloadFiles, handleImport } from '@/utils/util'
+import { mapGetters } from "vuex";
+import { downloadFiles, handleImport } from "@/utils/util";
 
 import {
   getCustomerList,
@@ -190,8 +409,8 @@ import {
   getRebateOrderAdd,
   getRebateOrderApply,
   getRebateOrderList,
-  getRebateOrderDownLoad
-} from '@/api/finance/rebate_form'
+  getRebateOrderDownLoad,
+} from "@/api/finance/rebate_form";
 export default {
   data() {
     return {
@@ -204,10 +423,10 @@ export default {
       searchForm: {
         // theTime: "",
 
-        remark: '',
-        createBy: ''
+        remark: "",
+        createBy: "",
       },
-      delIndex: null
+      delIndex: null,
       // rules: {
       //   theTime: [
       //     {
@@ -217,83 +436,87 @@ export default {
       //     },
       //   ],
       // },
-    }
+    };
   },
 
   computed: {
-    ...mapGetters(['name'])
+    ...mapGetters(["name"]),
   },
   created() {
-    this.getCustomerData()
-    this.searchForm.createBy = this.name
+    this.getCustomerData();
+    this.searchForm.createBy = this.name;
   },
+  // activated() {
+  //   Object.assign(this.$data, this.$options.data());
+  //   this.getCustomerData();
+  // },
   methods: {
     // 合计
     getSummaries(param) {
-      const { columns, data } = param
-      const sums = []
+      const { columns, data } = param;
+      const sums = [];
       columns.forEach((column, index) => {
         if (index === 0) {
-          sums[index] = '合计'
+          sums[index] = "合计";
         }
         if (index === 4) {
           const map2 = data.map((v) => {
-            return v.amount * 1
-          })
+            return v.amount * 1;
+          });
           sums[index] = map2
             .reduce((prev, curr) => {
-              const value = Number(curr)
+              const value = Number(curr);
               if (!isNaN(value)) {
-                return (prev + curr) * 1
+                return (prev + curr) * 1;
               } else {
-                return prev * 1
+                return prev * 1;
               }
             }, 0)
-            .toFixed(2)
+            .toFixed(2);
         }
         if (index === 5) {
           const map2 = data.map((v) => {
-            return v.withholdAmount * 1
-          })
+            return v.withholdAmount * 1;
+          });
           sums[index] = map2
             .reduce((prev, curr) => {
-              const value = Number(curr)
+              const value = Number(curr);
               if (!isNaN(value)) {
-                return (prev + curr) * 1
+                return (prev + curr) * 1;
               } else {
-                return prev * 1
+                return prev * 1;
               }
             }, 0)
-            .toFixed(2)
+            .toFixed(2);
         }
-      })
+      });
 
-      return sums
+      return sums;
     },
     // 删除
     delSeletFn() {
-      this.selectList.sort(function(a, b) {
-        return b - a
-      })
+      this.selectList.sort(function (a, b) {
+        return b - a;
+      });
 
       for (let index = 0; index < this.selectList.length; index++) {
         // console.log(index);
-        this.dataList.splice(this.selectList[index], 1)
+        this.dataList.splice(this.selectList[index], 1);
       }
     },
     // 选择项改变
     selectionChange(v) {
-      this.selectList = v.map((v) => v.index)
+      this.selectList = v.map((v) => v.index);
     },
 
     // 导入
     async handleImport(param) {
-      this.listLoading = true
-      const file = param.file
-      const formData = new FormData()
-      formData.append('file', file)
-      const result = await handleImport('rebate/order/import', formData)
-      this.importFileList = []
+      this.listLoading = true;
+      const file = param.file;
+      const formData = new FormData();
+      formData.append("file", file);
+      const result = await handleImport("rebate/order/import", formData);
+      this.importFileList = [];
       if (result.code == 200) {
         // let Arr = result.data.items;
         // let list = [];
@@ -328,36 +551,36 @@ export default {
         // let aa = [...this.dataList, ...list];
 
         // this.dataList = aa;
-        this.$message.success('导入成功')
-        this.$router.push('/finance/rebate/rebate_list')
+        this.$message.success("导入成功");
+        this.$router.push("/finance/rebate/rebate_list");
       } else {
-        this.$message.error(result.message)
+        this.$message.error(result.message);
       }
-      this.listLoading = false
+      this.listLoading = false;
     },
     // 下载模板
     async downLoadFn() {
-      downloadFiles('rebate/order/download')
+      downloadFiles("rebate/order/download");
     },
     // 重置
     cancelFn() {
       this.searchForm = {
-        theTime: '',
-        createTime: '',
-        remark: '',
-        createBy: ''
-      }
+        theTime: "",
+        createTime: "",
+        remark: "",
+        createBy: "",
+      };
     },
     rouClassNameFn({ row, rowIndex }) {
       // 把每一行的索引放进row
-      row.index = rowIndex
+      row.index = rowIndex;
     },
     onRowClick(row, event, column) {
-      this.delIndex = row.index
+      this.delIndex = row.index;
     },
     // 删除行
     delRowFn() {
-      this.dataList.splice(this.delIndex, 1)
+      this.dataList.splice(this.delIndex, 1);
     },
     // //提交审批
     // async submitFn() {
@@ -370,61 +593,61 @@ export default {
     // },
     // 新增
     async addFn() {
-      let arr
-      await this.$refs.searchForm.validate()
+      let arr;
+      await this.$refs.searchForm.validate();
       this.dataList.forEach((v) => {
         arr = v.walletList.filter(
           (i) => i.customerWalletId == v.customerWalletId
-        )
-        v.walletName = arr[0].name
-      })
-      await getRebateOrderAdd({ ...this.searchForm, items: this.dataList })
-      this.$message.success('保存成功')
-      this.$router.push('/finance/rebate/rebate_list')
+        );
+        v.walletName = arr[0].name;
+      });
+      await getRebateOrderAdd({ ...this.searchForm, items: this.dataList });
+      this.$message.success("保存成功");
+      this.$router.push("/finance/rebate/rebate_list");
     },
     // 选择经销商名称事件
     async changeCustomerFn(v, index, value) {
-      value.customerWalletId = ''
+      value.customerWalletId = "";
 
       const res = await getWalletCustomerList({
         customerId: v,
-        type: 'REBATE'
-      })
-      const res2 = this.customerData.filter((i) => i.id == v)
+        type: "REBATE",
+      });
+      const res2 = this.customerData.filter((i) => i.id == v);
 
-      this.$set(this.dataList[index], 'customerNumber', res2[0].number)
-      this.$set(this.dataList[index], 'customerName', res2[0].name)
+      this.$set(this.dataList[index], "customerNumber", res2[0].number);
+      this.$set(this.dataList[index], "customerName", res2[0].name);
 
-      this.$set(this.dataList[index], 'walletList', res.data)
+      this.$set(this.dataList[index], "walletList", res.data);
     },
     // 获取经销商数据
     async getCustomerData() {
-      const res = await getCustomerList({ pageSize: -1, pageNum: 1 })
-      this.customerData = res.data.records
+      const res = await getCustomerList({ pageSize: -1, pageNum: 1 });
+      this.customerData = res.data.records;
     },
 
     // 添加行
     addRowFn() {
       this.dataList.push({
-        customerNumber: '',
-        customerName: '',
-        customerWalletId: '',
+        customerNumber: "",
+        customerName: "",
+        customerWalletId: "",
         amount: null,
         withholdAmount: null,
-        policyFileNo: '',
-        policyDocNo: '',
-        policyYear: '',
-        policyMonth: '',
-        policyOrg: '',
-        customerArea: '',
-        customerAttr: '',
-        rewardActualCustomers: '',
-        remark1: '',
-        remark2: ''
-      })
-    }
-  }
-}
+        policyFileNo: "",
+        policyDocNo: "",
+        policyYear: "",
+        policyMonth: "",
+        policyOrg: "",
+        customerArea: "",
+        customerAttr: "",
+        rewardActualCustomers: "",
+        remark1: "",
+        remark2: "",
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 177 - 33
src/views/login/index.vue

@@ -2,15 +2,31 @@
   <div class="login-container">
     <div class="flexBox">
       <div>
-        <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left" @submit.native.prevent="handleLogin">
+        <el-form
+          ref="loginForm"
+          :model="loginForm"
+          :rules="loginRules"
+          class="login-form"
+          auto-complete="on"
+          label-position="left"
+          @submit.native.prevent="handleLogin"
+        >
           <div class="flex">
             <div class="image-container">
               <div class="empty-height">
                 <img class="logo" src="@/assets/login/logo.png" alt="" />
               </div>
-              <el-carousel :interval="5000" arrow="always" height="440px" class="carousel">
+              <el-carousel
+                :interval="5000"
+                arrow="always"
+                height="440px"
+                class="carousel"
+              >
                 <el-carousel-item v-for="item in banner" :key="item.id">
-                  <el-image :z-index="1" :src="imageURL + item.imgCarouselUrl"></el-image>
+                  <el-image
+                    :z-index="1"
+                    :src="imageURL + item.imgCarouselUrl"
+                  ></el-image>
                 </el-carousel-item>
               </el-carousel>
             </div>
@@ -18,10 +34,18 @@
               <div class="empty-height" />
               <div class="form-container">
                 <div class="flex title">
-                  <div class="title-item" :class="acitve == 'pas' ? 'acitve' : ''" @click="hanleTabs('pas', 'account')">
+                  <div
+                    class="title-item"
+                    :class="acitve == 'pas' ? 'acitve' : ''"
+                    @click="hanleTabs('pas', 'account')"
+                  >
                     密码登录
                   </div>
-                  <div class="title-item" :class="acitve == 'wei' ? 'acitve' : ''" @click="hanleTabs('wei', 'mobile')">
+                  <div
+                    class="title-item"
+                    :class="acitve == 'wei' ? 'acitve' : ''"
+                    @click="hanleTabs('wei', 'mobile')"
+                  >
                     手机号登录
                   </div>
                 </div>
@@ -30,72 +54,173 @@
                   <div v-if="acitve == 'pas'">
                     <el-form-item prop="username" class="input-box">
                       <span class="svg-container">
-                        <el-image style="width: 20px; height: 20px" :src="require('@/assets/login/icon_001.png')" fit="contain "></el-image>
+                        <el-image
+                          style="width: 20px; height: 20px"
+                          :src="require('@/assets/login/icon_001.png')"
+                          fit="contain "
+                        ></el-image>
                       </span>
-                      <el-input ref="username" v-model="loginForm.username" placeholder="请输入用户名" name="username" type="text" tabindex="1" auto-complete="on" />
+                      <el-input
+                        ref="username"
+                        v-model="loginForm.username"
+                        placeholder="请输入用户名"
+                        name="username"
+                        type="text"
+                        tabindex="1"
+                        auto-complete="on"
+                      />
                     </el-form-item>
 
                     <el-form-item prop="password" class="input-box">
                       <span class="svg-container">
-                        <el-image style="width: 20px; height: 20px" :src="require('@/assets/login/icon_002.png')" fit="contain "></el-image>
+                        <el-image
+                          style="width: 20px; height: 20px"
+                          :src="require('@/assets/login/icon_002.png')"
+                          fit="contain "
+                        ></el-image>
                       </span>
-                      <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType" placeholder="请输入密码" name="password" tabindex="2" auto-complete="off" @keyup.enter.native="handleLogin" />
+                      <el-input
+                        :key="passwordType"
+                        ref="password"
+                        v-model="loginForm.password"
+                        :type="passwordType"
+                        placeholder="请输入密码"
+                        name="password"
+                        tabindex="2"
+                        auto-complete="off"
+                        @keyup.enter.native="handleLogin"
+                      />
                       <span class="show-pwd" @click="showPwd">
-                        <svg-icon :icon-class="
+                        <svg-icon
+                          :icon-class="
                             passwordType === 'password' ? 'eye' : 'eye-open'
-                          " />
+                          "
+                        />
                       </span>
                     </el-form-item>
 
                     <div class="input-box">
                       <el-form-item prop="codeValue">
                         <span class="svg-container">
-                          <el-image style="width: 20px; height: 20px" :src="require('@/assets/login/icon_003.png')" fit="contain "></el-image>
+                          <el-image
+                            style="width: 20px; height: 20px"
+                            :src="require('@/assets/login/icon_003.png')"
+                            fit="contain "
+                          ></el-image>
                         </span>
-                        <el-input ref="codeValue" v-model="loginForm.codeValue" placeholder="请输入验证码" name="codeValue" type="text" tabindex="3" auto-complete="off" @keyup.enter.native="handleLogin" />
+                        <el-input
+                          ref="codeValue"
+                          v-model="loginForm.codeValue"
+                          placeholder="请输入验证码"
+                          name="codeValue"
+                          type="text"
+                          tabindex="3"
+                          auto-complete="off"
+                          @keyup.enter.native="handleLogin"
+                        />
                       </el-form-item>
                       <div class="code" @click.stop="getCode">
-                        <img :src="'data:image/jpeg;base64,' + codeImage" alt="" />
+                        <img
+                          :src="'data:image/jpeg;base64,' + codeImage"
+                          alt=""
+                        />
                       </div>
                     </div>
 
                     <div class="checkbox">
                       <div class="check-yes">
-                        <el-image style="width: 16px; height: 16px" :src="require('@/assets/login/icon_004.png')" fit="contain "></el-image>
-                        <el-image v-if="isRemenberPw" class="yes" style="width: 11px; height: 11px" :src="require('@/assets/login/icon_005.png')" fit="contain "></el-image>
+                        <el-image
+                          style="width: 16px; height: 16px"
+                          :src="require('@/assets/login/icon_004.png')"
+                          fit="contain "
+                        ></el-image>
+                        <el-image
+                          v-if="isRemenberPw"
+                          class="yes"
+                          style="width: 11px; height: 11px"
+                          :src="require('@/assets/login/icon_005.png')"
+                          fit="contain "
+                        ></el-image>
                       </div>
-                      <el-checkbox v-model="isRemenberPw">记住账号密码</el-checkbox>
+                      <el-checkbox v-model="isRemenberPw"
+                        >记住账号密码</el-checkbox
+                      >
                     </div>
 
                     <div class="button-container">
-                      <el-button :loading="loading" type="primary" @click.native.prevent="handleLogin">登录</el-button>
+                      <el-button
+                        :loading="loading"
+                        type="primary"
+                        @click.native.prevent="handleLogin"
+                        >登录</el-button
+                      >
                     </div>
                   </div>
                   <!-- 手机号登录 -->
                   <div v-else class="pas">
                     <el-form-item prop="username" class="input-box">
                       <span class="svg-container">
-                        <el-image style="width: 20px; height: 20px" :src="require('@/assets/login/icon_001.png')" fit="contain "></el-image>
+                        <el-image
+                          style="width: 20px; height: 20px"
+                          :src="require('@/assets/login/icon_001.png')"
+                          fit="contain "
+                        ></el-image>
                       </span>
-                      <el-input ref="username" v-model="loginForm.username" placeholder="请输入手机号" name="username" type="text" tabindex="1" auto-complete="on" />
+                      <el-input
+                        ref="username"
+                        v-model="loginForm.username"
+                        placeholder="请输入手机号"
+                        name="username"
+                        type="text"
+                        tabindex="1"
+                        auto-complete="on"
+                      />
                     </el-form-item>
                     <div class="input-box">
                       <el-form-item prop="codeValue">
                         <span class="svg-container">
-                          <el-image style="width: 20px; height: 20px" :src="require('@/assets/login/icon_003.png')" fit="contain "></el-image>
+                          <el-image
+                            style="width: 20px; height: 20px"
+                            :src="require('@/assets/login/icon_003.png')"
+                            fit="contain "
+                          ></el-image>
                         </span>
-                        <el-input ref="codeValue" v-model="loginForm.codeValue" placeholder="请输入验证码" name="codeValue" type="text" tabindex="3" auto-complete="off" @keyup.enter.native="handleLogin" />
+                        <el-input
+                          ref="codeValue"
+                          v-model="loginForm.codeValue"
+                          placeholder="请输入验证码"
+                          name="codeValue"
+                          type="text"
+                          tabindex="3"
+                          auto-complete="off"
+                          @keyup.enter.native="handleLogin"
+                        />
                       </el-form-item>
                       <div class="code" @click.stop="getCode">
-                        <img :src="'data:image/jpeg;base64,' + codeImage" alt="" />
+                        <img
+                          :src="'data:image/jpeg;base64,' + codeImage"
+                          alt=""
+                        />
                       </div>
                     </div>
                     <div class="input-box">
                       <el-form-item prop="smsCode">
                         <span class="svg-container">
-                          <el-image style="width: 20px; height: 20px" :src="require('@/assets/login/icon_003.png')" fit="contain "></el-image>
+                          <el-image
+                            style="width: 20px; height: 20px"
+                            :src="require('@/assets/login/icon_003.png')"
+                            fit="contain "
+                          ></el-image>
                         </span>
-                        <el-input ref="smsCode" v-model="loginForm.smsCode" placeholder="请输入短信验证码" name="smsCode" type="text" tabindex="3" auto-complete="off" />
+                        <el-input
+                          ref="smsCode"
+                          v-model="loginForm.smsCode"
+                          placeholder="请输入短信验证码"
+                          name="smsCode"
+                          type="text"
+                          tabindex="3"
+                          auto-complete="off"
+                        />
                       </el-form-item>
                       <div class="code2" @click.stop="getSmsCode">
                         <el-button :disabled="countDown != 60">{{
@@ -106,7 +231,12 @@
                       </div>
                     </div>
                     <div class="button-container">
-                      <el-button :loading="loading" type="primary" @click.native.prevent="handleLogin">登录</el-button>
+                      <el-button
+                        :loading="loading"
+                        type="primary"
+                        @click.native.prevent="handleLogin"
+                        >登录</el-button
+                      >
                     </div>
                   </div>
                 </transition>
@@ -117,17 +247,29 @@
       </div>
       <div class="info">
         <div class="info-item">
-          <el-link :href="companyList[0].icpRecordLink" :underline="false" target="_blank">{{
-              companyList[0].icpRecord
-            }}</el-link>
-          <div style="margin: 0 20px" v-if="companyList[0].companyName && companyList[0].icpRecordLink">
+          <el-link
+            :href="companyList[0].icpRecordLink"
+            :underline="false"
+            target="_blank"
+            >{{ companyList[0].icpRecord }}</el-link
+          >
+          <div
+            style="margin: 0 20px"
+            v-if="companyList[0].companyName && companyList[0].icpRecordLink"
+          >
             |
           </div>
-          <el-link :href="companyList[0].pubSecurityRecordLink" :underline="false" target="_blank">
-            <el-image style="width: 14px; height: 16px" :src="require('@/assets/login/icon_0001.png')"></el-image>
+          <el-link
+            :href="companyList[0].pubSecurityRecordLink"
+            :underline="false"
+            target="_blank"
+          >
+            <el-image
+              style="width: 14px; height: 16px"
+              :src="require('@/assets/login/icon_0001.png')"
+            ></el-image>
             {{ companyList[0].pubSecurityRecord }}
           </el-link>
-
         </div>
         <div>{{ companyList[0].companyName }}</div>
       </div>
@@ -305,12 +447,14 @@ export default {
             .then(() => {
               // console.log(this.redirect);
               this.$router.push({ path: this.redirect || "/" });
+              console.log(444);
               this.saveUnAndPw();
               this.$store.commit("user/showMessage", "yes");
               // this.$message.success("登录成功");
               this.loading = false;
             })
             .catch(() => {
+              console.log(555);
               this.getCode();
               this.loginForm.codeValue = "";
               this.loading = false;

+ 345 - 122
src/views/setting/other.vue

@@ -9,98 +9,221 @@
       <el-radio-button label="sixth">机型类别</el-radio-button>
       <el-radio-button label="seventh">登录类型</el-radio-button>
       <el-radio-button label="eigth">权限分类</el-radio-button>
-          <el-radio-button label="receipt"  v-if="$checkBtnRole('receipt', $route.meta.roles)">发票</el-radio-button>
-
+      <el-radio-button
+        label="receipt"
+        v-if="$checkBtnRole('receipt', $route.meta.roles)"
+        >发票</el-radio-button
+      >
     </el-radio-group>
 
     <div v-show="formType === 'first'">
-      <div style="margin: 40px 0 30px;">
+      <div style="margin: 40px 0 30px">
         <span>下单时间超过当天</span>
-        <el-time-picker v-model="firstForm.input1.dictValue" placeholder="选择时间点" size="small" format="HH:mm" style="width: 150px; margin: 0 10px;"></el-time-picker>
+        <el-time-picker
+          v-model="firstForm.input1.dictValue"
+          placeholder="选择时间点"
+          size="small"
+          format="HH:mm"
+          style="width: 150px; margin: 0 10px"
+        ></el-time-picker>
         <span>的订单,订单日期计为下一天的日期</span>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('first')">确 定</el-button>
+      <el-button type="primary" size="small" @click="submitForm('first')"
+        >确 定</el-button
+      >
     </div>
 
     <div v-show="formType === 'second'">
-      <div style="margin: 40px 0 30px;">
+      <div style="margin: 40px 0 30px">
         <div>工程登录二次引用密码设置</div>
         <div>
-          <el-input v-model="secondForm.input1.dictValue" placeholder="请输入密码" size="small" style="width: 150px; margin-top: 20px;"></el-input>
+          <el-input
+            v-model="secondForm.input1.dictValue"
+            placeholder="请输入密码"
+            size="small"
+            style="width: 150px; margin-top: 20px"
+          ></el-input>
         </div>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('second')">确 定</el-button>
+      <el-button type="primary" size="small" @click="submitForm('second')"
+        >确 定</el-button
+      >
     </div>
 
     <div v-show="formType === 'third'">
-      <div style="margin: 40px 0 30px;">
+      <div style="margin: 40px 0 30px">
+        <h4>佛山自动预留配置</h4>
+        <div>预留单自动生成时间,从订单审单后,第</div>
+        <el-input
+          v-model="thirdForm.input1.dictValue"
+          type="number"
+          @mousewheel.native.prevent
+          size="small"
+          style="width: 150px; margin-top: 20px; margin-right: 10px"
+        ></el-input>
+        <span>天零时起,按商家提交订单时间顺序,自动生成预留单</span>
+      </div>
+      <div style="margin: 40px 0 30px">
+        <h4>广州自动预留配置</h4>
         <div>预留单自动生成时间,从订单审单后,第</div>
-        <el-input v-model="thirdForm.input1.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 150px; margin-top: 20px; margin-right: 10px"></el-input>
+        <el-input
+          v-model="thirdForm.input2.dictValue"
+          type="number"
+          @mousewheel.native.prevent
+          size="small"
+          style="width: 150px; margin-top: 20px; margin-right: 10px"
+        ></el-input>
         <span>天零时起,按商家提交订单时间顺序,自动生成预留单</span>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('third')">确 定</el-button>
+      <el-button type="primary" size="small" @click="submitForm('third')"
+        >确 定</el-button
+      >
     </div>
 
     <div v-show="formType === 'fourth'">
-      <div style="margin: 40px 0 30px;">
+      <div style="margin: 40px 0 30px">
         <div>总可发货数 = 总库存数-总预留数-总发货申请暂扣</div>
         <div style="margin-top: 20px">订单查询库存时:</div>
         <div style="margin-top: 10px">总可发货数为0,显示无货</div>
         <div style="margin-top: 10px">
           <span>总可发货数</span>
-          <el-input v-model="fourthForm.input1.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <el-input
+            v-model="fourthForm.input1.dictValue"
+            type="number"
+            @mousewheel.native.prevent
+            size="small"
+            style="width: 100px; margin: 0 10px"
+          ></el-input>
           <span>到</span>
-          <el-input v-model="fourthForm.input2.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <el-input
+            v-model="fourthForm.input2.dictValue"
+            type="number"
+            @mousewheel.native.prevent
+            size="small"
+            style="width: 100px; margin: 0 10px"
+          ></el-input>
           <span>,总库存显示具体数量</span>
         </div>
         <div style="margin-top: 10px">
           <span>总可发货数</span>
-          <el-input v-model="fourthForm.input3.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <el-input
+            v-model="fourthForm.input3.dictValue"
+            type="number"
+            @mousewheel.native.prevent
+            size="small"
+            style="width: 100px; margin: 0 10px"
+          ></el-input>
           <span>到</span>
-          <el-input v-model="fourthForm.input4.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <el-input
+            v-model="fourthForm.input4.dictValue"
+            type="number"
+            @mousewheel.native.prevent
+            size="small"
+            style="width: 100px; margin: 0 10px"
+          ></el-input>
           <span>,总库存显示有货</span>
         </div>
         <div style="margin-top: 10px">
           <span>总可发货数大于</span>
-          <el-input v-model="fourthForm.input5.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <el-input
+            v-model="fourthForm.input5.dictValue"
+            type="number"
+            @mousewheel.native.prevent
+            size="small"
+            style="width: 100px; margin: 0 10px"
+          ></el-input>
           <span>,总库存显示充足</span>
         </div>
         <div style="margin-top: 30px">发货申请查询库存时:</div>
         <div style="margin-top: 10px">
           <span>可发货数大于</span>
-          <el-input v-model="fourthForm.input6.dictValue" type="number" @mousewheel.native.prevent size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <el-input
+            v-model="fourthForm.input6.dictValue"
+            type="number"
+            @mousewheel.native.prevent
+            size="small"
+            style="width: 100px; margin: 0 10px"
+          ></el-input>
           <span>显示充足</span>
         </div>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('fourth')">确 定</el-button>
+      <el-button type="primary" size="small" @click="submitForm('fourth')"
+        >确 定</el-button
+      >
     </div>
 
     <div v-show="formType === 'fifth'">
-      <div style="margin: 40px 0 30px;">
+      <div style="margin: 40px 0 30px">
         <div>二次打印密码设置</div>
         <div>
-          <el-input v-model="fifthForm.input1.dictValue" placeholder="请输入密码" size="small" style="width: 150px; margin-top: 20px;"></el-input>
+          <el-input
+            v-model="fifthForm.input1.dictValue"
+            placeholder="请输入密码"
+            size="small"
+            style="width: 150px; margin-top: 20px"
+          ></el-input>
         </div>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('fifth')">确 定</el-button>
+      <el-button type="primary" size="small" @click="submitForm('fifth')"
+        >确 定</el-button
+      >
     </div>
 
     <div v-show="formType === 'sixth'">
-      <div style="margin: 40px 0 30px;">
-        <el-button type="primary" size="mini" @click="addShowFn">新增</el-button>
+      <div style="margin: 40px 0 30px">
+        <el-button type="primary" size="mini" @click="addShowFn"
+          >新增</el-button
+        >
         <!-- 列表 -->
         <div class="mymain-container">
           <div class="table">
-            <el-table v-loading="listLoading" :data="sixthForm" element-loading-text="Loading" border fit highlight-current-row stripe>
-
-              <el-table-column align="left" label="名称" prop="dictCode" min-width="160" show-overflow-tooltip></el-table-column>
-              <el-table-column align="left" label="备注" prop="remark" min-width="170" show-overflow-tooltip></el-table-column>
-
-              <el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
+            <el-table
+              v-loading="listLoading"
+              :data="sixthForm"
+              element-loading-text="Loading"
+              border
+              fit
+              highlight-current-row
+              stripe
+            >
+              <el-table-column
+                align="left"
+                label="名称"
+                prop="dictCode"
+                min-width="160"
+                show-overflow-tooltip
+              ></el-table-column>
+              <el-table-column
+                align="left"
+                label="备注"
+                prop="remark"
+                min-width="170"
+                show-overflow-tooltip
+              ></el-table-column>
+
+              <el-table-column
+                align="center"
+                label="操作"
+                prop=""
+                min-width="160"
+                show-overflow-tooltip
+                fixed="right"
+              >
                 <template slot-scope="scope">
-                  <el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
-                  <el-popconfirm @onConfirm="deleFn(scope.row.sysDictId)" v-if="$checkBtnRole('del', $route.meta.roles)" title="这是一段内容确定删除吗?">
-                    <el-button type="text" class="textColor" slot="reference">删除</el-button>
+                  <el-button
+                    type="text"
+                    class="textColor"
+                    @click="editFn(scope.row)"
+                    >编辑</el-button
+                  >
+                  <el-popconfirm
+                    @onConfirm="deleFn(scope.row.sysDictId)"
+                    v-if="$checkBtnRole('del', $route.meta.roles)"
+                    title="这是一段内容确定删除吗?"
+                  >
+                    <el-button type="text" class="textColor" slot="reference"
+                      >删除</el-button
+                    >
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -108,24 +231,62 @@
           </div>
         </div>
       </div>
-
     </div>
     <div v-show="formType === 'seventh'">
-      <div style="margin: 40px 0 30px;">
-        <el-button type="primary" size="mini" @click="addShowFn">新增</el-button>
+      <div style="margin: 40px 0 30px">
+        <el-button type="primary" size="mini" @click="addShowFn"
+          >新增</el-button
+        >
         <!-- 列表 -->
         <div class="mymain-container">
           <div class="table">
-            <el-table v-loading="listLoading" :data="seventhForm" element-loading-text="Loading" border fit highlight-current-row stripe>
-
-              <el-table-column align="left" label="名称" prop="dictCode" min-width="160" show-overflow-tooltip></el-table-column>
-              <el-table-column align="left" label="备注" prop="remark" min-width="170" show-overflow-tooltip></el-table-column>
-
-              <el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
+            <el-table
+              v-loading="listLoading"
+              :data="seventhForm"
+              element-loading-text="Loading"
+              border
+              fit
+              highlight-current-row
+              stripe
+            >
+              <el-table-column
+                align="left"
+                label="名称"
+                prop="dictCode"
+                min-width="160"
+                show-overflow-tooltip
+              ></el-table-column>
+              <el-table-column
+                align="left"
+                label="备注"
+                prop="remark"
+                min-width="170"
+                show-overflow-tooltip
+              ></el-table-column>
+
+              <el-table-column
+                align="center"
+                label="操作"
+                prop=""
+                min-width="160"
+                show-overflow-tooltip
+                fixed="right"
+              >
                 <template slot-scope="scope">
-                  <el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
-                  <el-popconfirm @onConfirm="deleFn(scope.row.sysDictId)" v-if="$checkBtnRole('del', $route.meta.roles)" title="这是一段内容确定删除吗?">
-                    <el-button type="text" class="textColor" slot="reference">删除</el-button>
+                  <el-button
+                    type="text"
+                    class="textColor"
+                    @click="editFn(scope.row)"
+                    >编辑</el-button
+                  >
+                  <el-popconfirm
+                    @onConfirm="deleFn(scope.row.sysDictId)"
+                    v-if="$checkBtnRole('del', $route.meta.roles)"
+                    title="这是一段内容确定删除吗?"
+                  >
+                    <el-button type="text" class="textColor" slot="reference"
+                      >删除</el-button
+                    >
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -133,24 +294,62 @@
           </div>
         </div>
       </div>
-
     </div>
     <div v-show="formType === 'eigth'">
-      <div style="margin: 40px 0 30px;">
-        <el-button type="primary" size="mini" @click="addShowFn">新增</el-button>
+      <div style="margin: 40px 0 30px">
+        <el-button type="primary" size="mini" @click="addShowFn"
+          >新增</el-button
+        >
         <!-- 列表 -->
         <div class="mymain-container">
           <div class="table">
-            <el-table v-loading="listLoading" :data="eigthForm" element-loading-text="Loading" border fit highlight-current-row stripe>
-
-              <el-table-column align="left" label="名称" prop="dictCode" min-width="160" show-overflow-tooltip></el-table-column>
-              <el-table-column align="left" label="备注" prop="remark" min-width="170" show-overflow-tooltip></el-table-column>
-
-              <el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
+            <el-table
+              v-loading="listLoading"
+              :data="eigthForm"
+              element-loading-text="Loading"
+              border
+              fit
+              highlight-current-row
+              stripe
+            >
+              <el-table-column
+                align="left"
+                label="名称"
+                prop="dictCode"
+                min-width="160"
+                show-overflow-tooltip
+              ></el-table-column>
+              <el-table-column
+                align="left"
+                label="备注"
+                prop="remark"
+                min-width="170"
+                show-overflow-tooltip
+              ></el-table-column>
+
+              <el-table-column
+                align="center"
+                label="操作"
+                prop=""
+                min-width="160"
+                show-overflow-tooltip
+                fixed="right"
+              >
                 <template slot-scope="scope">
-                  <el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
-                  <el-popconfirm @onConfirm="deleFn(scope.row.sysDictId)" v-if="$checkBtnRole('del', $route.meta.roles)" title="这是一段内容确定删除吗?">
-                    <el-button type="text" class="textColor" slot="reference">删除</el-button>
+                  <el-button
+                    type="text"
+                    class="textColor"
+                    @click="editFn(scope.row)"
+                    >编辑</el-button
+                  >
+                  <el-popconfirm
+                    @onConfirm="deleFn(scope.row.sysDictId)"
+                    v-if="$checkBtnRole('del', $route.meta.roles)"
+                    title="这是一段内容确定删除吗?"
+                  >
+                    <el-button type="text" class="textColor" slot="reference"
+                      >删除</el-button
+                    >
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -158,47 +357,58 @@
           </div>
         </div>
       </div>
-
     </div>
-    <div  v-show="formType === 'receipt'" >
-      <div style="margin: 40px 0 30px;">
-         <el-date-picker
-              v-model="value1"
-              size="mini"
-              type="daterange"
-               value-format="yyyy-MM-dd HH:mm:ss"
-              range-separator="至"
-              :picker-options="setDisabled"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              style="margin:0 10px"
-            >
-            </el-date-picker>
-            <el-button
-              size="mini"
-
-              type="warning"
-              icon="el-icon-finished"
-              @click="updateReceipt"
-              >更新发票</el-button
-            >
+    <div v-show="formType === 'receipt'">
+      <div style="margin: 40px 0 30px">
+        <el-date-picker
+          v-model="value1"
+          size="mini"
+          type="daterange"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          range-separator="至"
+          :picker-options="setDisabled"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          style="margin: 0 10px"
+        >
+        </el-date-picker>
+        <el-button
+          size="mini"
+          type="warning"
+          icon="el-icon-finished"
+          @click="updateReceipt"
+          >更新发票</el-button
+        >
       </div>
     </div>
 
     <!-- //弹窗 -->
-    <el-dialog :title="title" :visible.sync="dialogForm" width="30%" :show-close="false" :close-on-click-modal="false">
-      <el-form size="mini" ref="addForm" :rules="rules" :model="addForm" label-width="120px">
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogForm"
+      width="30%"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        size="mini"
+        ref="addForm"
+        :rules="rules"
+        :model="addForm"
+        label-width="120px"
+      >
         <el-form-item label="名称" prop="dictCode">
           <el-input v-model="addForm.dictCode"></el-input>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
           <el-input v-model="addForm.remark"></el-input>
         </el-form-item>
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button size="mini" @click="cancelFn">取 消</el-button>
-        <el-button size="mini" type="primary" @click="addDataFn">确 定</el-button>
+        <el-button size="mini" type="primary" @click="addDataFn"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
   </div>
@@ -210,7 +420,7 @@ import {
   editDictList,
   addDictList,
   deleDictList,
-  updateReceipt
+  updateReceipt,
 } from "@/api/common";
 
 export default {
@@ -235,6 +445,7 @@ export default {
       },
       thirdForm: {
         input1: {},
+        input2: {},
       },
       fourthForm: {
         input1: {},
@@ -250,8 +461,8 @@ export default {
       sixthForm: [],
       seventhForm: [],
       eigthForm: [],
-      value1:'',
-      choiceDate:'',
+      value1: "",
+      choiceDate: "",
       setDisabled: {
         disabledDate: (time) => {
           if (this.choiceDate) {
@@ -354,39 +565,33 @@ export default {
     },
 
     changeType(val) {
-
-    if (this.formType === 'receipt') return
+      if (this.formType === "receipt") return;
+      console.log(val);
       this.getDetail(val);
     },
-
-    getDetail(type) {
-      const MAP = {
-        first: "ORDER_TIME_LIMIT",
-        second: "ENGIN_TWO_PWD",
-        third: "RESERVED_DAY",
-        fourth: "STOCK_ORDER",
-        fifth: "PRINT_PASSWORD",
-        sixth: "MACHINE_TYPE",
-        seventh: "SIGN_TYPE",
-        eigth: "POWER_CATEGORY",
-      };
-      getDictList({ sysDictEnum: MAP[type] }).then((res) => {
-
+    getDictList(e, type) {
+      getDictList({ sysDictEnum: e }).then((res) => {
+        console.log(res, "99");
         let data = res.data.map((item) => {
-
           return {
             sysDictId: item.sysDictId,
             dictValue: item.dictValue,
-            dictType:item.dictType,
-            dictCode:item.dictCode
+            dictType: item.dictType,
+            dictCode: item.dictCode,
           };
         });
         if (type != "fourth") {
-
+          if (e === "FO_SHAN_RESERVED_DAY") {
+            this[type + "Form"].input1 = data[0];
+            return;
+          } else if (e === "GUANG_ZHOU_RESERVED_DAY") {
+            this[type + "Form"].input2 = data[0];
+            return;
+          }
           this[type + "Form"].input1 = data[0];
-             console.log(777);
+          // this[type + "Form"].input2 = data[1];
+          console.log(777, this[type + "Form"].input1);
         } else {
-
           this[type + "Form"].input1 = data[0];
           this[type + "Form"].input2 = data[1];
           this[type + "Form"].input3 = data[2];
@@ -405,6 +610,25 @@ export default {
         }
       });
     },
+    getDetail(type) {
+      const MAP = {
+        first: "ORDER_TIME_LIMIT",
+        second: "ENGIN_TWO_PWD",
+        third: ["GUANG_ZHOU_RESERVED_DAY", "FO_SHAN_RESERVED_DAY"],
+        fourth: "STOCK_ORDER",
+        fifth: "PRINT_PASSWORD",
+        sixth: "MACHINE_TYPE",
+        seventh: "SIGN_TYPE",
+        eigth: "POWER_CATEGORY",
+      };
+      if (type === "third") {
+        MAP[type].forEach((e) => {
+          this.getDictList(e, type);
+        });
+        return;
+      }
+      this.getDictList(MAP[type], type);
+    },
 
     submitForm(type) {
       let list = [];
@@ -415,26 +639,25 @@ export default {
         }
         list.push(this[type + "Form"][key]);
       }
+      console.log(list, "890");
+
       editDictList(list).then((res) => {
         this.$successMsg("保存成功");
         this.getDetail(type);
       });
     },
-        updateReceipt() {
-
-    if (!this.value1) {
-      this.$errorMsg('请选择时间')
-      return
-    }
+    updateReceipt() {
+      if (!this.value1) {
+        this.$errorMsg("请选择时间");
+        return;
+      }
       updateReceipt({
-      startTime:this.value1[0],
-      endTime:this.value1[1]
-      }).then(res=>{
-
+        startTime: this.value1[0],
+        endTime: this.value1[1],
+      }).then((res) => {
         this.$successMsg("已更新");
-         this.value1 = ''
-      })
-
+        this.value1 = "";
+      });
     },
   },
 };

+ 190 - 136
src/views/setting/sub_account.vue

@@ -6,7 +6,14 @@
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button v-if="checkBtnRole('add')" size="small" type="primary" icon="el-icon-plus" @click="addOrEdit('add')">新增账号</el-button>
+          <el-button
+            v-if="checkBtnRole('add')"
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            @click="addOrEdit('add')"
+            >新增账号</el-button
+          >
         </div>
         <!--        <div class="fr">-->
         <!--          <ImportButton :im-url="'stock/importToll'" @importSuccess="getList" />-->
@@ -14,23 +21,40 @@
       </div>
 
       <div class="table">
-        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
           <el-table-column align="left" label="序号" type="index" width="50" />
           <el-table-column align="left" label="账号" prop="userName" />
           <el-table-column align="left" label="创建时间" prop="createTime" />
-          <el-table-column align="left" label="最后登录时间" prop="lastLoginTime" />
+          <el-table-column
+            align="left"
+            label="最后登录时间"
+            prop="lastLoginTime"
+          />
           <el-table-column align="left" label="主帐号" prop="isMaster">
             <template slot-scope="scope">
-
               <el-tag v-if="scope.row.isMaster" type="success">是</el-tag>
               <el-tag v-else type="danger">否</el-tag>
             </template>
           </el-table-column>
           <el-table-column align="center" label="操作" width="180">
             <template slot-scope="scope">
-              <el-button type="text" @click="addOrEdit('edit',scope.row)">修改</el-button>
-              <el-button v-if="checkBtnRole('detail')" type="text" @click="setMenuRole(scope.row.adminUserId,'role')">设置权限</el-button>
-
+              <el-button type="text" @click="addOrEdit('edit', scope.row)"
+                >修改</el-button
+              >
+              <el-button
+                v-if="checkBtnRole('detail')"
+                type="text"
+                @click="setMenuRole(scope.row.adminUserId, 'role')"
+                >设置权限</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -52,7 +76,15 @@
     </div>
 
     <!-- 设置权限 -->
-    <el-dialog title="设置权限" :visible.sync="roleFormVisible" :show-close="false" width="40%" :close-on-click-modal="false" custom-class="tree-dialog" top="50px">
+    <el-dialog
+      title="设置权限"
+      :visible.sync="roleFormVisible"
+      :show-close="false"
+      width="40%"
+      :close-on-click-modal="false"
+      custom-class="tree-dialog"
+      top="50px"
+    >
       <el-tree
         ref="tree"
         :data="menuRoleList"
@@ -67,29 +99,63 @@
         <span slot-scope="{ node, data }" class="custom-tree-node">
           <span>{{ node.label }}</span>
           <span v-if="data.type < 3">
-            <el-button type="text" size="mini" @click="() => quickSelection(data)">一键全选</el-button>
-            <el-button type="text" size="mini" style="color: #f56c6c" @click="() => quickCancel(data)">一键取消</el-button>
+            <el-button
+              type="text"
+              size="mini"
+              @click="() => quickSelection(data)"
+              >一键全选</el-button
+            >
+            <el-button
+              type="text"
+              size="mini"
+              style="color: #f56c6c"
+              @click="() => quickCancel(data)"
+              >一键取消</el-button
+            >
           </span>
         </span>
       </el-tree>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="roleFormVisible = false">{{ editId != 1 ? '取 消':'关 闭' }}</el-button>
-        <el-button v-if="editId != 1" type="primary" @click="submitRoleForm('role')">确 定</el-button>
+        <el-button @click="roleFormVisible = false">{{
+          editId != 1 ? "取 消" : "关 闭"
+        }}</el-button>
+        <el-button
+          v-if="editId != 1"
+          type="primary"
+          @click="submitRoleForm('role')"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisible"
       :close-on-click-modal="false"
       width="45%"
-      :title="'add'===addFormType?'新增':'修改'"
+      :title="'add' === addFormType ? '新增' : '修改'"
       @close="cancelAddForm"
     >
-      <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="demo-ruleForm">
-        <el-form-item v-if="addFormType!=='edit'" label="账号" prop="account">
-          <el-input v-model="ruleForm.account" type="text" autocomplete="off" />
+      <el-form
+        ref="ruleForm"
+        :model="ruleForm"
+        :rules="rules"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item v-if="addFormType !== 'edit'" label="账号" prop="account">
+          <el-input
+            v-model="ruleForm.account"
+            type="text"
+            autocomplete="off"
+            disabled
+            placeholder="系统自动生成"
+          />
         </el-form-item>
         <el-form-item label="密码" prop="password">
-          <el-input v-model="ruleForm.password" type="password" autocomplete="off" />
+          <el-input
+            v-model="ruleForm.password"
+            type="password"
+            autocomplete="off"
+          />
         </el-form-item>
       </el-form>
 
@@ -103,7 +169,7 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
 import {
   addSubAccount,
   deleteRole,
@@ -112,8 +178,8 @@ import {
   getAccountList,
   getMenuList,
   getRoleChecked,
-  setMenuRole
-} from '@/api/setting'
+  setMenuRole,
+} from "@/api/setting";
 
 export default {
   data() {
@@ -126,48 +192,37 @@ export default {
       listTotal: 0, // 列表总数
 
       editId: null,
-      addFormType: 'add',
+      addFormType: "add",
       addFormVisible: false,
       addForm: {
-        name: '' // 角色名
+        name: "", // 角色名
       },
       addFormRules: {
-        name: [
-          { required: true, message: '请输入角色名', trigger: 'blur' }
-        ]
+        name: [{ required: true, message: "请输入角色名", trigger: "blur" }],
       },
 
       roleFormVisible: false,
 
       menuRoleList: [],
       defaultProps: {
-        children: 'children',
-        label: 'moduleName'
+        children: "children",
+        label: "moduleName",
       },
       dialogVisible: false,
       ruleForm: {
-        account: '',
-        password: ''
+        account: "",
+        password: "",
       },
       rules: {
-        account: [
-          { required: true, message: '请输入账号', trigger: 'blur' }
-        ],
-        password: [
-          { required: true, message: '请输入密码', trigger: 'blur' }
-        ]
-      }
-    }
+        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
+      },
+    };
   },
   computed: {
-    ...mapGetters([
-      'userid',
-      'name',
-      'customerId'
-    ])
+    ...mapGetters(["userid", "name", "customerId"]),
   },
   created() {
-    this.getList()
+    this.getList();
   },
   methods: {
     // 查询按钮权限
@@ -176,67 +231,67 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0 ? true : false;
-      return true
+      return true;
     },
 
     getList() {
-      this.listLoading = true
+      this.listLoading = true;
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         customerId: this.customerId,
-         isMaster:false
-      }
-      getAccountList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
+        isMaster: false,
+      };
+      getAccountList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
+      this.currentPage = val;
+      this.getList();
     },
 
     // 操作 - 删除
     handleDelete(id) {
-      deleteRole({ adminRoleId: id }).then(res => {
-        this.getList()
-        this.$successMsg()
-      })
+      deleteRole({ adminRoleId: id }).then((res) => {
+        this.getList();
+        this.$successMsg();
+      });
     },
 
     // 新增编辑
     addOrEdit(type, row) {
-      this.addFormType = type
-      this.dialogVisible = true
-      if (type === 'edit') {
+      this.addFormType = type;
+      this.dialogVisible = true;
+      if (type === "edit") {
         this.$nextTick(() => {
           this.ruleForm = {
             account: row.userName,
-            password: '',
-            adminUserId: row.adminUserId
-          }
-        })
+            password: "",
+            adminUserId: row.adminUserId,
+          };
+        });
       }
     },
 
     // 取消 新增编辑
     cancelAddForm() {
-      this.dialogVisible = false
+      this.dialogVisible = false;
       this.$nextTick(() => {
-        this.$refs.tree.setCheckedKeys([])
-      })
-      this.$refs.ruleForm.resetFields()
+        this.$refs.tree.setCheckedKeys([]);
+      });
+      this.$refs.ruleForm.resetFields();
     },
 
     // 提交 新增编辑
@@ -245,121 +300,120 @@ export default {
         const params = {
           userName: this.ruleForm.account,
           password: this.ruleForm.password,
-          adminModuleIds: ''
+          adminModuleIds: "",
           // adminModuleIds:this.$refs.tree ? this.$refs.tree.getCheckedKeys().join(',') :
-        }
+        };
         if (valid) {
-          if (this.addFormType === 'edit') {
-            params.adminUserId = this.ruleForm.adminUserId
-            editSubAccount(params).then(res => {
-              this.cancelAddForm()
-              this.getList()
-              this.$successMsg('编辑成功')
-            })
+          if (this.addFormType === "edit") {
+            params.adminUserId = this.ruleForm.adminUserId;
+            editSubAccount(params).then((res) => {
+              this.cancelAddForm();
+              this.getList();
+              this.$successMsg("编辑成功");
+            });
           } else {
-            addSubAccount(params).then(res => {
-              this.cancelAddForm()
-              this.getList()
-              this.$successMsg('新增成功')
-            })
+            addSubAccount(params).then((res) => {
+              this.cancelAddForm();
+              this.getList();
+              this.$successMsg("新增成功");
+            });
           }
         }
-      })
+      });
     },
 
     // 设置权限 - 获取列表
     setMenuRole(id, type) {
-      this.roleFormVisible = true
-      this.editId = id
-      getMenuList({ adminUserId: this.userid }).then(res => {
-        this.menuRoleList = res.data
-      })
-      getRoleChecked({ adminUserId: id }).then(res => {
-        this.$refs.tree.setCheckedKeys(res.data)
-      })
+      this.roleFormVisible = true;
+      this.editId = id;
+      getMenuList({ adminUserId: this.userid }).then((res) => {
+        this.menuRoleList = res.data;
+      });
+      getRoleChecked({ adminUserId: id }).then((res) => {
+        this.$refs.tree.setCheckedKeys(res.data);
+      });
     },
 
     // 设置权限 - 提交数据
     submitRoleForm(type) {
       const params = {
-        adminModuleIds: this.$refs.tree.getCheckedKeys().join(','),
-        adminRoleId: this.editId
-      }
-      setMenuRole(params).then(res => {
-        this.getList()
-        this.$successMsg()
-      })
-
-      this.roleFormVisible = false
+        adminModuleIds: this.$refs.tree.getCheckedKeys().join(","),
+        adminRoleId: this.editId,
+      };
+      setMenuRole(params).then((res) => {
+        this.getList();
+        this.$successMsg();
+      });
+
+      this.roleFormVisible = false;
     },
 
     // 一键全选
     quickSelection(data) {
-      const nowChecked = this.$refs.tree.getCheckedKeys()
-      const thisId = data.moduleId
-      let childId = []
+      const nowChecked = this.$refs.tree.getCheckedKeys();
+      const thisId = data.moduleId;
+      let childId = [];
       if (data.children.length) {
-        childId = this.familyTree(data.children)
+        childId = this.familyTree(data.children);
       }
 
-      const setChecked = nowChecked.concat([thisId]).concat(childId)
+      const setChecked = nowChecked.concat([thisId]).concat(childId);
 
-      this.$refs.tree.setCheckedKeys(setChecked)
+      this.$refs.tree.setCheckedKeys(setChecked);
     },
 
     // 一键取消
     quickCancel(data) {
-      const nowChecked = this.$refs.tree.getCheckedKeys()
-      const thisId = data.moduleId
-      let childId = []
+      const nowChecked = this.$refs.tree.getCheckedKeys();
+      const thisId = data.moduleId;
+      let childId = [];
       if (data.children.length) {
-        childId = this.familyTree(data.children)
+        childId = this.familyTree(data.children);
       }
 
-      const setChecked = nowChecked
+      const setChecked = nowChecked;
       if (setChecked.indexOf(thisId) >= 0) {
-        setChecked.splice(setChecked.indexOf(thisId), 1)
+        setChecked.splice(setChecked.indexOf(thisId), 1);
       }
 
       if (childId.length) {
         for (var i = 0; i < childId.length; i++) {
           if (setChecked.indexOf(childId[i]) >= 0) {
-            setChecked.splice(setChecked.indexOf(childId[i]), 1)
+            setChecked.splice(setChecked.indexOf(childId[i]), 1);
           }
         }
       }
 
-      this.$refs.tree.setCheckedKeys(setChecked)
+      this.$refs.tree.setCheckedKeys(setChecked);
     },
 
     // 递归子id
     familyTree(arr) {
-      var temp = []
-      var forFn = function(list) {
+      var temp = [];
+      var forFn = function (list) {
         for (var i = 0; i < list.length; i++) {
-          var item = list[i]
+          var item = list[i];
           if (item.children) {
-            temp.push(item.moduleId)
-            forFn(item.children)
+            temp.push(item.moduleId);
+            forFn(item.children);
           }
         }
-      }
-      forFn(arr)
-      return temp
+      };
+      forFn(arr);
+      return temp;
     },
 
     changeStatus(id, status) {
       editRole({
         adminRoleId: id,
-        visitSysStatus: status
-      }).then(res => {
-        this.getList()
-        this.$successMsg('编辑成功')
-      })
-    }
-
-  }
-}
+        visitSysStatus: status,
+      }).then((res) => {
+        this.getList();
+        this.$successMsg("编辑成功");
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -370,7 +424,7 @@ export default {
       max-height: calc(100vh - 140px - 54px - 70px);
       overflow-y: scroll;
       padding: 0 30px;
-      >.el-tree-node {
+      > .el-tree-node {
         padding: 15px 0;
         border: 1px dashed #ddd;
         margin-bottom: 15px;

+ 1 - 3
src/views/supply/apply/apply_list.vue

@@ -568,9 +568,7 @@
                     ? "同步成功"
                     : scope.row.gejiangSync === 0
                     ? "待同步"
-                    : scope.row.gejiangSync === -1
-                    ? "同步失败"
-                    : ""
+                    : "同步失败"
                 }}
               </template>
             </el-table-column>

+ 25 - 4
src/views/supply/apply/engin_list.vue

@@ -274,9 +274,23 @@
               type="selection"
               width="55"
               fixed="left"
+              :selectable="selectable"
             />
             <el-table-column
               align="left"
+              label="订单状态"
+              prop="type"
+              min-width="120"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{
+                  scope.row.automaticStatus ? "非计划单推发货" : "计划单推发货"
+                }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="left"
               label="订单类型"
               prop="type"
               min-width="100"
@@ -614,9 +628,7 @@
                     ? "同步成功"
                     : scope.row.gejiangSync === 0
                     ? "待同步"
-                    : scope.row.gejiangSync === -1
-                    ? "同步失败"
-                    : ""
+                    : "同步失败"
                 }}
               </template>
             </el-table-column>
@@ -640,6 +652,7 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('apply', $route.meta.roles) &&
                     scope.row.examineStatus === 'SAVE'
                   "
@@ -651,6 +664,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('apply', $route.meta.roles) &&
                     scope.row.examineStatus === 'WAIT'
                   "
@@ -662,6 +676,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('examine', $route.meta.roles) &&
                     scope.row.examineStatus === 'OK'
                   "
@@ -673,6 +688,7 @@
                 </el-popconfirm>
                 <el-button
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
                     (scope.row.examineStatus === 'SAVE' ||
                       scope.row.examineStatus === 'FAIL') &&
@@ -685,6 +701,7 @@
                 </el-button>
                 <el-button
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
                     (scope.row.examineStatus === 'SAVE' ||
                       scope.row.examineStatus === 'FAIL') &&
@@ -697,6 +714,7 @@
                 </el-button>
                 <el-button
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('examine', $route.meta.roles) &&
                     scope.row.examineStatus === 'WAIT'
                   "
@@ -710,7 +728,10 @@
                 </el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="scope.row.examineStatus !== 'OK'"
+                  v-if="
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK'
+                  "
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"

+ 1 - 3
src/views/supply/deliver/commerce_list.vue

@@ -503,9 +503,7 @@
                     ? "同步成功"
                     : scope.row.gejiangSync === 0
                     ? "待同步"
-                    : scope.row.gejiangSync === -1
-                    ? "同步失败"
-                    : ""
+                    : "同步失败"
                 }}
               </template>
             </el-table-column>

+ 470 - 139
src/views/supply/deliver/home_list.vue

@@ -3,7 +3,13 @@
     <div v-show="!isShowDetail">
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <el-form ref="screenForm" :model="screenForm" label-width="85px" size="mini" label-position="left">
+        <el-form
+          ref="screenForm"
+          :model="screenForm"
+          label-width="85px"
+          size="mini"
+          label-position="left"
+        >
           <el-row :gutter="20">
             <!-- <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item prop="orderNum" label-width="0">
@@ -16,27 +22,42 @@
             </el-col> -->
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发货单号" prop="orderNum">
-                <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
+                <el-input
+                  v-model="screenForm.orderNum"
+                  placeholder="请输入发货单号"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="订单号" prop="orderNo">
-                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+                <el-input
+                  v-model="screenForm.orderNo"
+                  placeholder="请输入订单号"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="合同号" prop="contractNo">
-                <el-input v-model="screenForm.contractNo" placeholder="请输入合同号"></el-input>
+                <el-input
+                  v-model="screenForm.contractNo"
+                  placeholder="请输入合同号"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编号" prop="jxsNum">
-                <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号"></el-input>
+                <el-input
+                  v-model="screenForm.jxsNum"
+                  placeholder="请输入经销商编号"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商名称" prop="jxsName">
-                <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
+                <el-input
+                  v-model="screenForm.jxsName"
+                  placeholder="请输入经销商名称"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -47,49 +68,76 @@
                   range-separator="至"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
-                  end-placeholder="结束日期">
-                </el-date-picker>
+                  end-placeholder="结束日期"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="产品名称" prop="chName">
-                <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
+                <el-input
+                  v-model="screenForm.chName"
+                  placeholder="请输入产品名称"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="规格型号" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+                <el-input
+                  v-model="screenForm.model"
+                  placeholder="请输入规格型号"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item prop="type" label="存货类别">
-                <el-select v-model="screenForm.type" placeholder="选择存货类别" style="width: 100%" clearable>
-                  <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.name"></el-option>
+                <el-select
+                  v-model="screenForm.type"
+                  placeholder="选择存货类别"
+                  style="width: 100%"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in categoryList"
+                    :key="item.name"
+                    :label="item.name"
+                    :value="item.name"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="业务员" prop="salesMan">
-                <el-select v-model="screenForm.salesMan" placeholder="选择业务员" clearable filterable style="width: 100%">
+                <el-select
+                  v-model="screenForm.salesMan"
+                  placeholder="选择业务员"
+                  clearable
+                  filterable
+                  style="width: 100%"
+                >
                   <el-option
                     v-for="item in salesmanList"
                     :key="item.adminUserId"
                     :label="item.nickName"
-                    :value="item.adminUserId">
-                  </el-option>
+                    :value="item.adminUserId"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="区域" prop="refRegionWork">
-                <el-input v-model="screenForm.refRegionWork" placeholder="请输入区域"></el-input>
+                <el-input
+                  v-model="screenForm.refRegionWork"
+                  placeholder="请输入区域"
+                />
               </el-form-item>
             </el-col>
 
             <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
-                <el-button type="primary" @click="submitScreenForm">搜索</el-button>
+                <el-button type="primary" @click="submitScreenForm"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -102,7 +150,7 @@
             <!-- <el-button size="mini" type="warning" icon="el-icon-close">退货</el-button> -->
           </div>
           <div class="fr">
-            <ExportButton :exUrl="'ship/pExport'" :exParams="exParams" />
+            <ExportButton :ex-url="'ship/pExport'" :ex-params="exParams" />
           </div>
         </div>
         <div class="table">
@@ -115,92 +163,357 @@
             highlight-current-row
             stripe
             show-summary
-            :summary-method="$getSummaries">
-            <el-table-column align="left" label="发货单号" prop="id" min-width="140" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.id" />
-                <span>{{scope.row.id}}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="发货日期" prop="orderTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.enginOrderNo" />
-                <span>{{scope.row.enginOrderNo}}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip>
+            :summary-method="$getSummaries"
+          >
+            <el-table-column
+              align="left"
+              label="发货单号"
+              prop="id"
+              min-width="140"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.customerNumber" />
-                <span>{{scope.row.customerNumber}}</span>
+                <CopyButton :copy-text="scope.row.id" />
+                <span>{{ scope.row.id }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="发货申请日期"
+              prop="orderTime"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="仓库"
+              prop="correspondName"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="订单号"
+              prop="enginOrderNo"
+              min-width="140"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.customerName" />
-                <span>{{scope.row.customerName}}</span>
+                <CopyButton :copy-text="scope.row.enginOrderNo" />
+                <span>{{ scope.row.enginOrderNo }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="存货类别" prop="categoryName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="工程登录编号"
+              prop="refEnginRecordNo"
+              min-width="150"
+              show-overflow-tooltip
+            />
+
+            <el-table-column
+              align="left"
+              label="经销商名称"
+              prop="customerName"
+              min-width="250"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialCode" />
-                <span>{{scope.row.materialCode}}</span>
+                <CopyButton :copy-text="scope.row.customerName" />
+                <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="使用单位"
+              prop="refUseUnit"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="产品名称"
+              prop="materialName"
+              min-width="160"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{scope.row.materialOldNumber}}</span>
+                <CopyButton :copy-text="scope.row.materialName" />
+                <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="物料编码"
+              prop="materialCode"
+              min-width="120"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
-                <span>{{scope.row.materialName}}</span>
+                <CopyButton :copy-text="scope.row.materialCode" />
+                <span>{{ scope.row.materialCode }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="产品编码"
+              prop="materialOldNumber"
+              min-width="140"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
-                <span>{{scope.row.specification}}</span>
+                <CopyButton :copy-text="scope.row.materialOldNumber" />
+                <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="区域" prop="refRegionWork" min-width="160" show-overflow-tooltip></el-table-column>
 
-            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="未出库数量" prop="notOutNumber" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="规格型号"
+              prop="specification"
+              min-width="350"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.singlePayPrice | numToFixed}}
+                <CopyButton :copy-text="scope.row.specification" />
+                <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{scope.row.payAmount | numToFixed}}
+
+            <el-table-column
+              align="right"
+              label="数量"
+              prop="qty"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="right"
+              label="单价"
+              prop="price"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="right"
+              label="总金额"
+              prop="payAmount"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="安装地址"
+              prop="refInstallAddress"
+              min-width="300"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="联系人"
+              prop="refLinkman"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="固定电话"
+              prop="refTel"
+              min-width="150"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="移动电话"
+              prop="refPhone"
+              min-width="150"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="销售类型"
+              prop="saleTypeName"
+              min-width="150"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="项目类别"
+              prop="refProjectCategory"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="行业类别"
+              prop="refTradeCategory"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="跨区厂编号"
+              prop="refFactoryNo"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="保证函"
+              prop="refPromiseProvide"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="押金"
+              prop="takeDeposit"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template v-slot="scope">
+                {{ scope.row.takeDeposit ? "不扣" : "扣" }}
               </template>
             </el-table-column>
-            <el-table-column align="right" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="第几次申报"
+              prop="refDeclareNo"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="备注信息"
+              prop="headerRemark"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="格力内部备注"
+              prop="geLiInerNote"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="区域"
+              prop="refRegionWork"
+              min-width="300"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="业务员"
+              prop="serviceName"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="实装物料编码"
+              prop="realMaterialNumber"
+              min-width="150"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="实装厂产品编码"
+              prop="realMaterialOldNumber"
+              min-width="150"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="实装规格型号"
+              prop="realSpecification"
+              min-width="300"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="发货申请备注"
+              prop="remark"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="二级经销商代码"
+              prop="secondCustomerNumber"
+              min-width="150"
+              show-overflow-tooltip
+            />
+
+            <el-table-column
+              align="left"
+              label="经销商编码"
+              prop="customerNumber"
+              min-width="150"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.payRebateAmount | numToFixed}}
+                <CopyButton :copy-text="scope.row.customerNumber" />
+                <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="制单人"
+              prop="createBy"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="制单日期"
+              prop="createTime"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="审单人"
+              prop="approvalName"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="审单日期"
+              prop="approvalTime"
+              min-width="200"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="right"
+              label="返利金额"
+              prop="payRebateAmount"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.totalDiscAmount | numToFixed}}
+                {{ scope.row.payRebateAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="操作" width="200" fixed="right">
+
+            <el-table-column
+              align="center"
+              label="操作"
+              width="200"
+              fixed="right"
+            >
               <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-                <el-button type="text" @click="getPassword(scope.row.id)">获取密码</el-button>
-                <el-button type="text" @click="openShareDetail(scope.row.id)">密码记录</el-button>
+                <el-button type="text" @click="toDetail(scope.row)"
+                  >详情</el-button
+                >
+                <el-button type="text" @click="getPassword(scope.row.id)"
+                  >获取密码</el-button
+                >
+                <el-button type="text" @click="openShareDetail(scope.row.id)"
+                  >密码记录</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -209,43 +522,55 @@
       <div class="pagination clearfix">
         <div class="fr">
           <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal">
-          </el-pagination>
+            :total="listTotal"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
         </div>
       </div>
     </div>
 
     <!-- 密码记录 -->
-    <el-dialog title="密码记录" :visible.sync="isShowDialog" :show-close="false" width="50%" :close-on-click-modal="false">
-      <div class="table" style="margin: 10px 0 20px;">
+    <el-dialog
+      title="密码记录"
+      :visible.sync="isShowDialog"
+      :show-close="false"
+      width="50%"
+      :close-on-click-modal="false"
+    >
+      <div class="table" style="margin: 10px 0 20px">
         <el-table
           v-loading="dialogTable_listLoading"
           :data="dialogTable_dataList"
           element-loading-text="Loading"
           tooltip-effect="dark"
           style="width: 100%"
-          max-height="270">
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" prop="printPassword" label="密码"></el-table-column>
-          <el-table-column align="center" prop="createTime" label="打印时间"></el-table-column>
+          max-height="270"
+        >
+          <el-table-column
+            align="center"
+            label="序号"
+            type="index"
+            width="50"
+          />
+          <el-table-column align="center" prop="printPassword" label="密码" />
+          <el-table-column align="center" prop="createTime" label="打印时间" />
         </el-table>
       </div>
       <div class="pagination clearfix">
         <div class="fr">
           <el-pagination
-            @current-change="dialogTableCurrentChange"
             :current-page="dialogTable_currentPage"
             :page-size="dialogTable_pageSize"
             background
             layout="prev, pager, next"
-            :total="dialogTable_listTotal">
-          </el-pagination>
+            :total="dialogTable_listTotal"
+            @current-change="dialogTableCurrentChange"
+          />
         </div>
       </div>
 
@@ -254,17 +579,25 @@
       </div>
     </el-dialog>
 
-    <HomeDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList"  ref="refDetail" />
-
+    <HomeDetail
+      v-if="isShowDetail"
+      ref="refDetail"
+      :list-item="queryItem"
+      @backListFormDetail="backList"
+    />
   </div>
 </template>
 
 <script>
-import { getEnginList, getPassword, getPasswordRecord } from "@/api/supply/deliver";
-import { getCategoryList, getSalesmanList } from '@/api/common'
+import {
+  getEnginList,
+  getPassword,
+  getPasswordRecord,
+} from "@/api/supply/deliver";
+import { getCategoryList, getSalesmanList } from "@/api/common";
 import HomeDetail from "@/views/supply/deliver/components/home_detail";
 
-let that
+let that;
 export default {
   components: {
     HomeDetail,
@@ -276,18 +609,19 @@ export default {
       listTotal: 0, // 列表总数
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        orderNum: '',
-        orderNo: '',
-        contractNo: '',
-        jxsName: '',
-        chName: '',
-        model: '',
-        date: '',
-        jxsNum: '',
-        status: '',
-        salesMan: '',
-        refRegionWork:''
+      screenForm: {
+        // 筛选表单数据
+        orderNum: "",
+        orderNo: "",
+        contractNo: "",
+        jxsName: "",
+        chName: "",
+        model: "",
+        date: "",
+        jxsNum: "",
+        status: "",
+        salesMan: "",
+        refRegionWork: "",
       },
       salesmanList: [],
       categoryList: [],
@@ -300,7 +634,7 @@ export default {
       dialogTable_listTotal: 0, // 密码记录 - 列表总数
 
       queryItem: {},
-    }
+    };
   },
 
   computed: {
@@ -313,16 +647,16 @@ export default {
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
         specification: this.screenForm.model,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
         categoryName: this.screenForm.type,
         serviceId: this.screenForm.salesMan,
-        refRegionWork:this.screenForm.refRegionWork,
+        refRegionWork: this.screenForm.refRegionWork,
         orderType: 2, // 2家用工程 3商用工程
-      }
+      };
     },
     isShowDetail() {
-      return this.queryItem.hasOwnProperty('id');
+      return this.queryItem.hasOwnProperty("id");
     },
   },
 
@@ -344,9 +678,9 @@ export default {
         pageSize: -1,
         isCustomer: 0,
         status: true,
-      }).then(res => {
+      }).then((res) => {
         this.salesmanList = res.data.records;
-      })
+      });
     },
 
     // 获取存货类别列表
@@ -354,16 +688,16 @@ export default {
       getCategoryList({
         pageNum: 1,
         pageSize: -1,
-      }).then(res => {
+      }).then((res) => {
         this.categoryList = res.data.records;
-      })
+      });
     },
 
     // 查询列表
     getList() {
       this.listLoading = true;
 
-      let params = {
+      const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
@@ -373,23 +707,23 @@ export default {
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
         specification: this.screenForm.model,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
         categoryName: this.screenForm.type,
-        refRegionWork:this.screenForm.refRegionWork,
+        refRegionWork: this.screenForm.refRegionWork,
         serviceId: this.screenForm.salesMan,
         orderType: 2, // 2家用工程 3商用工程
       };
       getEnginList(params).then((res) => {
-        res.data.records.forEach(item => {
+        res.data.records.forEach((item) => {
           item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
-          item.sums1 = ['refundableQty', 'notOutNumber'];
-          item.sums2 = ['payAmount', 'afterTaxPrice', 'noTotalAmount'];
-        })
+          item.sums1 = ["refundableQty", "notOutNumber"];
+          item.sums2 = ["payAmount", "afterTaxPrice", "noTotalAmount"];
+        });
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;
-      })
+      });
     },
 
     // 提交筛选表单
@@ -421,10 +755,9 @@ export default {
     // 进入详情
     toDetail(item) {
       this.queryItem = item;
-      this.$nextTick(()=>{
-        this.$refs.refDetail.initPrint()
-      })
-
+      this.$nextTick(() => {
+        this.$refs.refDetail.initPrint();
+      });
     },
 
     backList() {
@@ -433,12 +766,12 @@ export default {
 
     // 获取密码
     getPassword(id) {
-      getPassword({id}).then(res => {
-        this.$alert(res.data, '新密码', {
-          confirmButtonText: '确定',
-          callback: action => {}
+      getPassword({ id }).then((res) => {
+        this.$alert(res.data, "新密码", {
+          confirmButtonText: "确定",
+          callback: (action) => {},
         });
-      })
+      });
     },
 
     // 密码记录 - 获取列表
@@ -446,12 +779,12 @@ export default {
       getPasswordRecord({
         pageNum: this.dialogTable_currentPage,
         pageSize: this.dialogTable_pageSize,
-        id
-      }).then(res => {
+        id,
+      }).then((res) => {
         this.dialogTable_dataList = res.data.records;
         this.dialogTable_listTotal = res.data.total;
         this.dialogTable_listLoading = false;
-      })
+      });
     },
 
     // 密码记录 - 打开弹窗
@@ -466,10 +799,8 @@ export default {
       this.dialogTable_currentPage = val;
       this.getPasswordRecord();
     },
-  }
-}
+  },
+};
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>

+ 106 - 71
src/views/supply/deliver/sum_list.vue

@@ -206,16 +206,23 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="打印状态" prop="printStatus">
+              <el-form-item label="预约提货打印" prop="printStatus">
                 <el-select
                   v-model="screenForm.printStatus"
-                  placeholder="选择打印状态"
+                  placeholder="选择预约提货打印"
                   clearable
                   filterable
                   style="width: 100%"
                 >
-                  <el-option label="是" :value="1" />
-                  <el-option label="否" :value="0" />
+                  <el-option
+                    label="是"
+                    :value="1"
+                  />
+                  <el-option
+                    label="否"
+                    :value="0"
+                  />
+
                 </el-select>
               </el-form-item>
             </el-col>
@@ -228,8 +235,15 @@
                   filterable
                   style="width: 100%"
                 >
-                  <el-option label="广州" value="GZ" />
-                  <el-option label="佛山" value="FS" />
+                  <el-option
+                    label="广州"
+                    value="GZ"
+                  />
+                  <el-option
+                    label="佛山"
+                    value="FS"
+                  />
+
                 </el-select>
               </el-form-item>
             </el-col>
@@ -243,18 +257,37 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="制单人" prop="createBy">
-                <el-input
-                  v-model="screenForm.createBy"
-                  placeholder="请输入制单人"
-                />
+                <el-input v-model="screenForm.createBy" placeholder="请输入制单人" />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货汇总打印" prop="invoicePrintStatus">
+                <el-select
+                  v-model="screenForm.invoicePrintStatus"
+                  placeholder="选择发货汇总打印"
+                  clearable
+                  filterable
+                  style="width: 100%"
+                >
+                  <el-option
+                    label="是"
+                    :value="1"
+                  />
+                  <el-option
+                    label="否"
+                    :value="0"
+                  />
+
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
-                <el-button type="primary" @click="submitScreenForm"
-                  >搜索</el-button
-                >
+                <el-button
+                  type="primary"
+                  @click="submitScreenForm"
+                >搜索</el-button>
               </el-form-item>
             </el-col>
           </el-row>
@@ -269,7 +302,7 @@
               size="mini"
               :disabled="tableSelection.length < 1"
               @click="toPrint"
-              >打印发货单
+            >打印发货单
             </el-button>
             <div v-if="totalNum" class="num">
               当前列表总发货数量:{{ totalNum }}
@@ -324,7 +357,11 @@
             @select="handleSelect"
             @select-all="handleSelectAll"
           >
-            <el-table-column align="center" type="selection" width="55" />
+            <el-table-column
+              align="center"
+              type="selection"
+              width="55"
+            />
             <el-table-column
               align="right"
               label="打印次数"
@@ -839,60 +876,55 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="导出项" :visible.sync="dialogVisible" width="50%">
-      <el-checkbox
-        v-model="checkAll"
-        :indeterminate="isIndeterminate"
-        @change="handleCheckAllChange"
-        >全选</el-checkbox
-      >
-      <div style="margin: 15px 0" />
+    <el-dialog
+      title="导出项"
+      :visible.sync="dialogVisible"
+      width="50%"
+    >
+      <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
+      <div style="margin: 15px 0;" />
       <el-checkbox-group v-model="check" @change="handleCheckedCitiesChange">
-        <el-checkbox v-for="item in excelData" :label="item.value">{{
-          item.name
-        }}</el-checkbox>
+        <el-checkbox v-for="item in excelData" :label="item.value">{{ item.name }}</el-checkbox>
       </el-checkbox-group>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { getSumList } from "@/api/supply/deliver";
-import print from "@/mixin/print";
-import { checkPassword, getListInvoiceNumber } from "@/api/supply/pickup";
-import { getCategoryList, getSalesmanList } from "@/api/common";
-import SumPrint from "@/views/supply/deliver/components/sum_print";
-import { getWarehouseList } from "@/api/supply/apply";
-import printPreview from "./components/design/preview.vue";
+import { getSumList } from '@/api/supply/deliver'
+import print from '@/mixin/print'
+import { checkPassword, getListInvoiceNumber } from '@/api/supply/pickup'
+import { getCategoryList, getSalesmanList } from '@/api/common'
+import SumPrint from '@/views/supply/deliver/components/sum_print'
+import { getWarehouseList } from '@/api/supply/apply'
+import printPreview from './components/design/preview.vue'
 export default {
   components: {
     SumPrint,
-    printPreview,
+    printPreview
   },
   filters: {
     orderTypeFilter(val) {
       const MAP = {
-        HOME: "家用单",
-        TRADE: "商用单",
-        RETAIL: "零售单",
-        RETAIL_POLICY: "销售政策单",
-        PERMU_HOME: "置换家用单",
-        PERMU_TRADE: "置换商用单",
-        PERMU_RETAIL: "置换零售单",
-        PERMU_RETAIL_POLICY: "置换销售政策单",
-        REQUISITION_HOME: "调拨家用单",
-        REQUISITION_TRADE: "调拨商用单",
-        REQUISITION_RETAIL: "调拨零售单",
-        REQUISITION_RETAIL_POLICY: "调拨销售政策单",
-      };
-      return MAP[val];
-    },
+        HOME: '家用单',
+        TRADE: '商用单',
+        RETAIL: '零售单',
+        RETAIL_POLICY: '销售政策单',
+        PERMU_HOME: '置换家用单',
+        PERMU_TRADE: '置换商用单',
+        PERMU_RETAIL: '置换零售单',
+        PERMU_RETAIL_POLICY: '置换销售政策单',
+        REQUISITION_HOME: '调拨家用单',
+        REQUISITION_TRADE: '调拨商用单',
+        REQUISITION_RETAIL: '调拨零售单',
+        REQUISITION_RETAIL_POLICY: '调拨销售政策单'
+      }
+      return MAP[val]
+    }
   },
   mixins: [print],
   data() {
@@ -904,26 +936,27 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: {
         // 筛选表单数据
-        goodsName: "",
-        goodsCode: "",
-        goodsOldCode: "",
-        model: "",
-        createDate: "",
-        deliverDate: "",
+        goodsName: '',
+        goodsCode: '',
+        goodsOldCode: '',
+        model: '',
+        createDate: '',
+        deliverDate: '',
         correspondId: [],
-        jxsNum: "",
-        jxsName: "",
-        orderNum: "",
-        type: "",
-        salesMan: "",
-        k3ServiceId: "",
-        mainOrderId: "",
-        approvaTime: "",
-        types: "",
-        printStatus: "",
-        discriminate: "",
-        refEnginRecordNo: "",
-        createBy: "",
+        jxsNum: '',
+        jxsName: '',
+        orderNum: '',
+        type: '',
+        salesMan: '',
+        k3ServiceId: '',
+        mainOrderId: '',
+        approvaTime: '',
+        types: '',
+        printStatus: '',
+        discriminate: '',
+        refEnginRecordNo: '',
+        invoicePrintStatus: '',
+        createBy: ''
       },
       invoiceList: [
         {
@@ -1001,6 +1034,7 @@ export default {
         k3ServiceId: this.screenForm.k3ServiceId,
         mainOrderId: this.screenForm.mainOrderId,
         printStatus: this.screenForm.printStatus,
+        invoicePrintStatus: this.screenForm.invoicePrintStatus,
         approvalEndTime: this.screenForm.approvaTime
           ? this.screenForm.approvaTime[1]
           : "",
@@ -1112,6 +1146,7 @@ export default {
         materialOldNumber: this.screenForm.goodsOldCode,
         specification: this.screenForm.model,
         printStatus: this.screenForm.printStatus,
+        invoicePrintStatus: this.screenForm.invoicePrintStatus,
         discriminate: this.screenForm.discriminate,
         createBy: this.screenForm.createBy,
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 530 - 177
src/views/supply/engin/commerce_list.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 667 - 190
src/views/supply/engin/components/commerce_detail.vue


+ 278 - 109
src/views/supply/engin/components/commerce_examine.vue

@@ -87,7 +87,7 @@
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
           <div class="value">
-            {{ detailData.takeDeposit ? '是':'否' }}
+            {{ detailData.takeDeposit ? "是" : "否" }}
             <!-- <el-checkbox v-model="detailData.takeDeposit">{{detailData.takeDeposit ? '是':'否'}}</el-checkbox> -->
           </div>
         </el-col>
@@ -102,13 +102,19 @@
         <el-col :span="24" class="item">
           <div class="label">格力回复</div>
           <div class="value">
-            <el-input v-model="detailData.geLiNote" placeholder="请输入格力回复" />
+            <el-input
+              v-model="detailData.geLiNote"
+              placeholder="请输入格力回复"
+            />
           </div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">格力内部备注</div>
           <div class="value">
-            <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
+            <el-input
+              v-model="detailData.geLiInerNote"
+              placeholder="请输入格力内部备注"
+            />
           </div>
         </el-col>
         <el-col :span="24" class="item">
@@ -133,15 +139,15 @@
           <div class="label">关闭日期</div>
           <div class="value">{{ detailData.closeTime }}</div>
         </el-col>
-        <!--        <el-col :span="24" class="item">-->
-        <!--          <div class="label">计划单</div>-->
-        <!--          <div class="value">-->
-        <!--            <el-checkbox v-model="detailData.isPlanOrder" disabled true-label="true" false-label="false">-->
-        <!--              {{ detailData.isPlanOrder=='true'?'是':'否' }}-->
-        <!--            </el-checkbox>-->
-
-        <!--          </div>-->
-        <!--        </el-col>-->
+        <el-col :span="24" class="item">
+          <div class="label">计划单</div>
+          <div class="value">
+            <el-radio-group v-model="detailData.isPlanOrder" disabled>
+              <el-radio label="true">是</el-radio>
+              <el-radio label="false">否</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
       </el-row>
     </div>
 
@@ -162,52 +168,185 @@
         :summary-method="$getSummaries"
       >
         <el-table-column align="center" label="序号" type="index" width="50" />
-        <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
-        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="引用记录"
+          prop="useRefCount"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="物料编码"
+          prop="materialNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="产品编码"
+          prop="materialOldNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="规格型号"
+          prop="specification"
+          min-width="350"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
             <!-- <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent></el-input> -->
           </template>
         </el-table-column>
-        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="数量" prop="number" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="工程登录数量"
+          prop="enginNum"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="数量"
+          prop="number"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="订单金额"
+          prop="totalAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="使用返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="返利类型"
+          prop="customerWalletName2"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="使用返利金额"
+          prop="payRebateAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="格力折扣"
+          prop="discAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="现金钱包"
+          prop="customerWalletName"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="实付金额"
+          prop="payAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="是否直调"
+          prop="isDirectTransfer"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            {{ scope.row.isDirectTransfer ? '是' : '否' }}
+            {{ scope.row.isDirectTransfer ? "是" : "否" }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+        <el-table-column
+          align="right"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="已发货数量"
+          prop="hasSendQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="备注"
+          prop="remark"
+          min-width="160"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="税率"
+          prop="tax"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="仓库"
+          prop="correspondName"
+          min-width="100"
+          show-overflow-tooltip
+        />
       </el-table>
     </div>
 
@@ -226,136 +365,166 @@
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
-          <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入审批说明" /></div>
+          <div class="value">
+            <el-input
+              v-model="examineForm.remark"
+              placeholder="请输入审批说明"
+            />
+          </div>
         </el-col>
       </el-row>
     </div>
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
-        <el-button type="warning" @click="clickSubmitForm(0)">审批驳回</el-button>
-        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
+        <el-button type="primary" @click="clickSubmitForm(1)"
+          >审批通过</el-button
+        >
+        <el-button type="warning" @click="clickSubmitForm(0)"
+          >审批驳回</el-button
+        >
+        <el-popconfirm
+          title="确定关闭吗?"
+          style="margin-left: 10px"
+          @onConfirm="goBack"
+        >
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
     </div>
-
   </div>
 </template>
 
 <script>
-import { getOrderDetail, examineCom } from '@/api/supply/engin'
+import { getOrderDetail, examineCom } from "@/api/supply/engin";
 
 export default {
-  name: 'CommerceExamine',
-  componentName: 'CommerceExamine',
+  name: "CommerceExamine",
+  componentName: "CommerceExamine",
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: '已关闭', value: 'CLOSE' }
-      ]
-      const obj = statusList.find(o => o.value == val)
-      return obj ? obj.label : ''
-    }
+        { label: "已关闭", value: "CLOSE" },
+      ];
+      const obj = statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
-  props: ['listItem'],
+  props: ["listItem"],
   data() {
     return {
-      userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
+      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
       detailData: {},
 
       formLoading: false,
       examineForm: {
-        remark: ''
-      }
-    }
+        remark: "",
+      },
+    };
   },
 
   created() {
-    this.getDetail()
+    this.getDetail();
   },
 
   methods: {
     getDate() {
-      var date = new Date()
-      var seperator1 = '-'
-      var year = date.getFullYear()
-      var month = date.getMonth() + 1
-      var strDate = date.getDate()
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
       if (month >= 1 && month <= 9) {
-        month = '0' + month
+        month = "0" + month;
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = '0' + strDate
+        strDate = "0" + strDate;
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate
-      return currentdate
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
     },
 
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail')
+      this.$emit("backListFormDetail");
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then(res => {
+      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
         if (res.data.items) {
-          res.data.items.forEach(item => {
-            item.number = (item.qty * 100 - item.retiredQty * 100) / 100
-            item.sums1 = ['number', 'directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty']
-            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount']
-          })
+          res.data.items.forEach((item) => {
+            item.number = (item.qty * 100 - item.retiredQty * 100) / 100;
+            item.sums1 = [
+              "number",
+              "directTransferQty",
+              "qty",
+              "enginNum",
+              "refundableQty",
+              "tdQty",
+            ];
+            item.sums2 = [
+              "totalAmount",
+              "payAmount",
+              "price",
+              "payRebateAmount",
+              "discAmount",
+            ];
+            item.correspondName = res.data.correspondName;
+          });
         }
-        this.detailData = res.data
-        this.examineForm.remark = res.data.examineNote
-      })
+        res.data.isPlanOrder = String(res.data.isPlanOrder);
+
+        this.detailData = res.data;
+
+        this.examineForm.remark = res.data.examineNote;
+      });
     },
 
     // 审批
     clickSubmitForm(val) {
-      this.$confirm('此操作将审批订单, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        const params = this.detailData
-        params.examineNote = this.examineForm.remark
-        params.examineResult = val
-        examineCom(params).then(res => {
-          this.$successMsg()
-          this.goBack()
-          this.$parent.getList()
+      this.$confirm("此操作将审批订单, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          const params = this.detailData;
+          params.examineNote = this.examineForm.remark;
+          params.examineResult = val;
+          examineCom(params).then((res) => {
+            this.$successMsg();
+            this.goBack();
+            this.$parent.getList();
+          });
         })
-      }).catch(() => {})
-    }
-
-  }
-}
+        .catch(() => {});
+    },
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 612 - 202
src/views/supply/engin/components/commerce_form.vue


+ 284 - 112
src/views/supply/engin/components/commerce_return.vue

@@ -78,7 +78,7 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
-          <div class="value">{{ detailData.takeDeposit ? '是':'否' }}</div>
+          <div class="value">{{ detailData.takeDeposit ? "是" : "否" }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">文件编号</div>
@@ -116,15 +116,15 @@
           <div class="label">关闭日期</div>
           <div class="value">{{ detailData.closeTime }}</div>
         </el-col>
-        <!--        <el-col :span="24" class="item">-->
-        <!--          <div class="label">计划单</div>-->
-        <!--          <div class="value">-->
-        <!--            <el-checkbox v-model="detailData.isPlanOrder" disabled true-label="true" false-label="false">-->
-        <!--              {{ detailData.isPlanOrder=='true'?'是':'否' }}-->
-        <!--            </el-checkbox>-->
-
-        <!--          </div>-->
-        <!--        </el-col>-->
+        <el-col :span="24" class="item">
+          <div class="label">计划单</div>
+          <div class="value">
+            <el-radio-group v-model="detailData.isPlanOrder" disabled>
+              <el-radio label="true">是</el-radio>
+              <el-radio label="false">否</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
       </el-row>
     </div>
 
@@ -145,56 +145,201 @@
         :summary-method="$getSummaries"
       >
         <el-table-column align="center" label="序号" type="index" width="50" />
-        <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
-        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="引用记录"
+          prop="useRefCount"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="物料编码"
+          prop="materialNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="产品编码"
+          prop="materialOldNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="规格型号"
+          prop="specification"
+          min-width="350"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip />
-        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="工程登录数量"
+          prop="enginNum"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="数量"
+          prop="qty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="订单金额"
+          prop="totalAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="使用返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="返利类型"
+          prop="customerWalletName2"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="使用返利金额"
+          prop="payRebateAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="格力折扣"
+          prop="discAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="现金钱包"
+          prop="customerWalletName"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="实付金额"
+          prop="payAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="是否直调"
+          prop="isDirectTransfer"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            {{ scope.row.isDirectTransfer ? '是' : '否' }}
+            {{ scope.row.isDirectTransfer ? "是" : "否" }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="可退数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="可退数量"
+          prop="refundableQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="退订数量"
+          prop="tdQty"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            <el-input v-model="scope.row.tdQty" size="mini" type="number" @blur="hasTdQty" @mousewheel.native.prevent />
+            <el-input
+              v-model="scope.row.tdQty"
+              size="mini"
+              type="number"
+              @blur="hasTdQty"
+              @mousewheel.native.prevent
+            />
           </template>
         </el-table-column>
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+        <el-table-column
+          align="left"
+          label="备注"
+          prop="remark"
+          min-width="160"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="税率"
+          prop="tax"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="仓库"
+          prop="correspondName"
+          min-width="100"
+          show-overflow-tooltip
+        />
       </el-table>
     </div>
 
@@ -213,142 +358,169 @@
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">退订说明</div>
-          <div class="value"><el-input v-model="returnForm.remark" placeholder="请输入退订说明" /></div>
+          <div class="value">
+            <el-input
+              v-model="returnForm.remark"
+              placeholder="请输入退订说明"
+            />
+          </div>
         </el-col>
       </el-row>
     </div>
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
-        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
+        <el-button type="primary" @click="clickSubmitForm()"
+          >确定退订</el-button
+        >
+        <el-popconfirm
+          title="确定关闭吗?"
+          style="margin-left: 10px"
+          @onConfirm="goBack"
+        >
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
     </div>
-
   </div>
 </template>
 
 <script>
-import { getOrderDetail, returnCom } from '@/api/supply/engin'
+import { getOrderDetail, returnCom } from "@/api/supply/engin";
 
 export default {
-  name: 'CommerceReturn',
-  componentName: 'CommerceReturn',
+  name: "CommerceReturn",
+  componentName: "CommerceReturn",
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: '已关闭', value: 'CLOSE' }
-      ]
-      const obj = statusList.find(o => o.value == val)
-      return obj ? obj.label : ''
-    }
+        { label: "已关闭", value: "CLOSE" },
+      ];
+      const obj = statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
-  props: ['listItem'],
+  props: ["listItem"],
   data() {
     return {
-      userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
+      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
       detailData: {},
 
       formLoading: false,
       returnForm: {
-        remark: ''
-      }
-    }
+        remark: "",
+      },
+    };
   },
 
   created() {
-    this.getDetail()
+    this.getDetail();
   },
 
   methods: {
     getDate() {
-      var date = new Date()
-      var seperator1 = '-'
-      var year = date.getFullYear()
-      var month = date.getMonth() + 1
-      var strDate = date.getDate()
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
       if (month >= 1 && month <= 9) {
-        month = '0' + month
+        month = "0" + month;
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = '0' + strDate
+        strDate = "0" + strDate;
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate
-      return currentdate
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
     },
 
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail')
+      this.$emit("backListFormDetail");
     },
     hasTdQty(row) {
       if (row.tdQty < 0) {
-        row.tdQty = 0
-        this.$errorMsg('不能填负数')
+        row.tdQty = 0;
+        this.$errorMsg("不能填负数");
       }
     },
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then(res => {
+      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
         if (res.data.items) {
-          res.data.items.forEach(item => {
-            item.number = (item.qty * 100 - item.retiredQty * 100) / 100
-            item.sums1 = ['number', 'directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty']
-            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount']
-          })
+          res.data.items.forEach((item) => {
+            item.number = (item.qty * 100 - item.retiredQty * 100) / 100;
+            item.sums1 = [
+              "number",
+              "directTransferQty",
+              "qty",
+              "enginNum",
+              "refundableQty",
+              "tdQty",
+            ];
+            item.sums2 = [
+              "totalAmount",
+              "payAmount",
+              "price",
+              "payRebateAmount",
+              "discAmount",
+            ];
+            item.correspondName = res.data.correspondName;
+          });
         }
-        this.detailData = res.data
-      })
+        res.data.isPlanOrder = String(res.data.isPlanOrder);
+
+        this.detailData = res.data;
+      });
     },
 
     // 退订
     clickSubmitForm(val) {
-      this.$confirm('此操作将退订订单, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        const params = {
-          enginOrderId: this.detailData.enginOrderId,
-          items: this.detailData.items,
-          refundNote: this.returnForm.remark,
-          refEnginRecordNo: this.detailData.refEnginRecordNo
-        }
-        returnCom(params).then(res => {
-          this.$successMsg()
-          this.goBack()
-          this.$parent.getList()
+      this.$confirm("此操作将退订订单, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          const params = {
+            enginOrderId: this.detailData.enginOrderId,
+            items: this.detailData.items,
+            refundNote: this.returnForm.remark,
+            refEnginRecordNo: this.detailData.refEnginRecordNo,
+          };
+          returnCom(params).then((res) => {
+            this.$successMsg();
+            this.goBack();
+            this.$parent.getList();
+          });
         })
-      }).catch(() => {})
-    }
-
-  }
-}
+        .catch(() => {});
+    },
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>

+ 210 - 105
src/views/supply/engin/components/engin_detail.vue

@@ -10,103 +10,102 @@
       <el-row>
         <el-col :span="8" class="item">
           <div class="label">工程登录编号</div>
-          <div class="value">{{detailData.enginInfoNo}}</div>
+          <div class="value">{{ detailData.enginInfoNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">订单日期</div>
-          <div class="value">{{detailData.orderDate}}</div>
+          <div class="value">{{ detailData.orderDate }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">业务员</div>
-          <div class="value">{{detailData.serviceName}}</div>
+          <div class="value">{{ detailData.serviceName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">经销商编码</div>
-          <div class="value">{{detailData.customerNumber}}</div>
+          <div class="value">{{ detailData.customerNumber }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">项目名称</div>
-          <div class="value">{{detailData.projectName}}</div>
+          <div class="value">{{ detailData.projectName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">机型类别</div>
-          <div class="value">{{detailData.machineType}}</div>
+          <div class="value">{{ detailData.machineType }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">经销商名称</div>
-          <div class="value">{{detailData.customerName}}</div>
+          <div class="value">{{ detailData.customerName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">使用单位</div>
-          <div class="value">{{detailData.useUnit}}</div>
+          <div class="value">{{ detailData.useUnit }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">行业类别</div>
-          <div class="value">{{detailData.tradeCategory}}</div>
+          <div class="value">{{ detailData.tradeCategory }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">工程编号</div>
-          <div class="value">{{detailData.projectNo}}</div>
+          <div class="value">{{ detailData.projectNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">厂工程编码</div>
-          <div class="value">{{detailData.enginFactoryNo}}</div>
+          <div class="value">{{ detailData.enginFactoryNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">工程登录类型</div>
-          <div class="value">{{detailData.enginSignType}}</div>
+          <div class="value">{{ detailData.enginSignType }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">联系人</div>
-          <div class="value">{{detailData.linkman}}</div>
+          <div class="value">{{ detailData.linkman }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">联系电话</div>
-          <div class="value">{{detailData.phone}}</div>
+          <div class="value">{{ detailData.phone }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">固定电话</div>
-          <div class="value">{{detailData.tel}}</div>
+          <div class="value">{{ detailData.tel }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">文件编号</div>
-          <div class="value">{{detailData.fileNo}}</div>
+          <div class="value">{{ detailData.fileNo }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">安装地址</div>
-          <div class="value">{{detailData.installAddress}}</div>
+          <div class="value">{{ detailData.installAddress }}</div>
         </el-col>
 
         <template v-if="!isCustomer">
-        <el-col :span="16" class="item">
-
-          <div class="label">格力内部备注</div>
-          <div class="value">{{detailData.geLiInerNote}}</div>
-        </el-col>
-        <el-col v-if="!isDealer" :span="8" class="item">
-          <div class="label">权限分类</div>
-          <div class="value">{{detailData.powerCategory}}</div>
-        </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">格力内部备注</div>
+            <div class="value">{{ detailData.geLiInerNote }}</div>
+          </el-col>
+          <el-col v-if="!isDealer" :span="8" class="item">
+            <div class="label">权限分类</div>
+            <div class="value">{{ detailData.powerCategory }}</div>
+          </el-col>
         </template>
         <el-col :span="24" class="item">
           <div class="label">格力回复</div>
-          <div class="value">{{detailData.geLiNote}}</div>
+          <div class="value">{{ detailData.geLiNote }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">备注</div>
-          <div class="value">{{detailData.remark}}</div>
+          <div class="value">{{ detailData.remark }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">制单人</div>
-          <div class="value">{{detailData.createName}}</div>
+          <div class="value">{{ detailData.createName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">制单日期</div>
-          <div class="value">{{detailData.createTime}}</div>
+          <div class="value">{{ detailData.createTime }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">合同有效期</div>
-          <div class="value">{{detailData.contractExpireDate}}</div>
+          <div class="value">{{ detailData.contractExpireDate }}</div>
         </el-col>
       </el-row>
     </div>
@@ -125,29 +124,113 @@
         stripe
         max-height="400"
         show-summary
-        :summary-method="$getSummaries">
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+        :summary-method="$getSummaries"
+      >
+        <el-table-column
+          align="center"
+          label="序号"
+          type="index"
+          width="50"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="物料编码"
+          prop="materialNumber"
+          min-width="120"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="产品编码"
+          prop="materialOldNumber"
+          min-width="120"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="规格型号"
+          prop="specification"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="数量"
+          prop="qty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="订单金额"
+          prop="totalAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="已订数量" prop="hasOrderQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="已发货数" prop="hasDeliverQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          align="right"
+          label="已订数量"
+          prop="hasOrderQty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="已发货数"
+          prop="hasDeliverQty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="备注"
+          prop="remark"
+          min-width="200"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="税率"
+          prop="taxRate"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
       </el-table>
     </div>
 
@@ -157,17 +240,28 @@
       </div>
       <div class="diy-table-1">
         <el-row :gutter="0">
-          <el-col :span="12" class="item">
+          <el-col :span="8" class="item">
             <div class="label">审批人</div>
-            <div class="value">{{detailData.confirmName}}</div>
+            <div class="value">{{ detailData.confirmName }}</div>
           </el-col>
-          <el-col :span="12" class="item">
+          <el-col :span="8" class="item">
+            <div class="label">是否计划单</div>
+            <div class="value">
+              <el-radio-group v-model="detailData.isPlanOrder" disabled>
+                <el-radio :label="true">是</el-radio>
+                <el-radio :label="false">否</el-radio>
+              </el-radio-group>
+            </div>
+          </el-col>
+          <el-col :span="8" class="item">
             <div class="label">审批结果</div>
-            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+            <div class="value">
+              {{ detailData.examineStatus | statusFilter }}
+            </div>
           </el-col>
           <el-col :span="24" class="item">
             <div class="label">审批说明</div>
-            <div class="value">{{detailData.examineNote}}</div>
+            <div class="value">{{ detailData.examineNote }}</div>
           </el-col>
         </el-row>
       </div>
@@ -175,11 +269,18 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="overData" v-if="!isDealer" :disabled="detailData.examineStatus !== 'OK'">直调完结</el-button>
+        <el-button
+          type="primary"
+          @click="overData"
+          v-if="!isDealer"
+          :disabled="
+            detailData.examineStatus !== 'OK' || detailData.directTransferStatus
+          "
+          >直调完结</el-button
+        >
         <el-button @click="goBack">返回列表</el-button>
       </div>
     </div>
-
   </div>
 </template>
 
@@ -187,35 +288,38 @@
 import { getEnginDetail, overEngin } from "@/api/supply/engin";
 import { mapGetters } from "vuex";
 export default {
-  name: 'EnginDetail',
-  componentName: 'EnginDetail',
-  props: ['listItem'],
+  name: "EnginDetail",
+  componentName: "EnginDetail",
+  props: ["listItem"],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
-         // { label: '审核驳回', value: 'FAIL' },,
-        { label: '已关闭', value: 'CLOSE' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        // { label: '审核驳回', value: 'FAIL' },,
+        { label: "已关闭", value: "CLOSE" },
       ];
-      let obj = statusList.find(o => o.value == val);
-      return obj ? obj.label : ''
-    }
+      let obj = statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
   data() {
     return {
       detailData: {},
-    }
+    };
   },
 
   computed: {
-     ...mapGetters(['isCustomer']),
+    ...mapGetters(["isCustomer"]),
     isExamine() {
-      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
+      return (
+        this.detailData.examineStatus === "OK" ||
+        this.detailData.examineStatus === "FAIL"
+      );
     },
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer
+      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
     },
   },
 
@@ -226,57 +330,58 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+      this.$emit("backListFormDetail");
     },
 
     // 获取详情
     getDetail() {
-      getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
-        if(res.data.items) {
-          res.data.items.forEach(item => {
-            item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty'];
-            item.sums2 = ['totalAmount', 'price'];
-          })
+      getEnginDetail({ id: this.listItem.enginInfoId }).then((res) => {
+        if (res.data.items) {
+          res.data.items.forEach((item) => {
+            item.sums1 = ["qty", "hasOrderQty", "hasDeliverQty"];
+            item.sums2 = ["totalAmount", "price"];
+          });
         }
         this.detailData = res.data;
-      })
+      });
     },
 
     // 直调完结
     overData() {
-      this.$confirm('此操作将直调完结订单, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        overEngin({id: this.listItem.enginInfoId}).then(res => {
-          this.$successMsg();
-          this.getDetail();
+      this.$confirm("此操作将直调完结订单, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          overEngin({ id: this.listItem.enginInfoId }).then((res) => {
+            this.$successMsg();
+            this.getDetail();
+          });
         })
-      }).catch(() => {});
+        .catch(() => {});
     },
-
-  }
-}
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 481 - 182
src/views/supply/engin/components/engin_examine.vue


+ 295 - 278
src/views/supply/engin/components/engin_form.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="detail-container">
-    <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
+    <el-page-header :content="listItem ? '编辑':'新增'" @back="goBack" />
 
     <div class="main-title">
       <div class="title">工程信息单</div>
@@ -10,7 +10,7 @@
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="工程登录编号" prop="orderNum">
-            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled></el-input>
+            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
@@ -21,8 +21,8 @@
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="系统自动生成">
-            </el-date-picker>
+              placeholder="系统自动生成"
+            />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -32,8 +32,8 @@
                 v-for="item in salesmanList"
                 :key="item.adminUserId"
                 :label="item.nickName"
-                :value="item.adminUserId">
-              </el-option>
+                :value="item.adminUserId"
+              />
             </el-select>
           </el-form-item>
         </el-col>
@@ -48,12 +48,12 @@
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
-            <el-input v-model="mainForm.jxsNum" placeholder="选择经销商" disabled></el-input>
+            <el-input v-model="mainForm.jxsNum" placeholder="选择经销商" disabled />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="项目名称" prop="enginName">
-            <el-input v-model="mainForm.enginName" placeholder="请输入项目名称"></el-input>
+            <el-input v-model="mainForm.enginName" placeholder="请输入项目名称" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -61,26 +61,28 @@
             <el-select v-model="mainForm.machineType" placeholder="选择机型类别" size="small" clearable style="width: 100%">
               <el-option
                 v-for="item in machineTypeList"
-                :key="item.dictCode" :label="item.dictValue" :value="item.dictCode">
-              </el-option>
+                :key="item.dictCode"
+                :label="item.dictValue"
+                :value="item.dictCode"
+              />
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商名称" prop="jxsNum">
-            <el-select v-model="mainForm.jxsNum" placeholder="选择经销商" size="small" filterable clearable style="width: 100%" @change="changeDealer" :disabled="listItem != undefined">
+            <el-select v-model="mainForm.jxsNum" placeholder="选择经销商" size="small" filterable clearable style="width: 100%" :disabled="listItem != undefined" @change="changeDealer">
               <el-option
                 v-for="item in dealerList"
                 :key="item.number"
                 :label="item.name"
-                :value="item.number">
-              </el-option>
+                :value="item.number"
+              />
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="使用单位" prop="company">
-            <el-input v-model="mainForm.company" placeholder="请输入使用单位"></el-input>
+            <el-input v-model="mainForm.company" placeholder="请输入使用单位" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -88,19 +90,21 @@
             <el-select v-model="mainForm.tradeCategory" placeholder="选择行业类别" size="small" clearable style="width: 100%">
               <el-option
                 v-for="item in tradeCategoryList"
-                :key="item.value" :label="item.label" :value="item.value">
-              </el-option>
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="工程编号" prop="enginNum">
-            <el-input v-model="mainForm.enginNum" placeholder="请输入工程编号"></el-input>
+            <el-input v-model="mainForm.enginNum" placeholder="请输入工程编号" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="厂工程编码" prop="factoryNum">
-            <el-input v-model="mainForm.factoryNum" placeholder="请输入厂工程编码"></el-input>
+            <el-input v-model="mainForm.factoryNum" placeholder="请输入厂工程编码" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -108,64 +112,68 @@
             <el-select v-model="mainForm.loginType" placeholder="选择工程登录类型" size="small" clearable style="width: 100%">
               <el-option
                 v-for="item in loginTypeList"
-                :key="item.dictCode" :label="item.dictValue" :value="item.dictCode">
-              </el-option>
+                :key="item.dictCode"
+                :label="item.dictValue"
+                :value="item.dictCode"
+              />
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="联系人" prop="linkman">
-            <el-input v-model="mainForm.linkman" placeholder="请输入联系人"></el-input>
+            <el-input v-model="mainForm.linkman" placeholder="请输入联系人" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="联系电话" prop="phone">
-            <el-input v-model="mainForm.phone" placeholder="请输入联系电话"></el-input>
+            <el-input v-model="mainForm.phone" placeholder="请输入联系电话" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="固定电话" prop="tel">
-            <el-input v-model="mainForm.tel" placeholder="请输入固定电话"></el-input>
+            <el-input v-model="mainForm.tel" placeholder="请输入固定电话" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="16" :lg="16">
           <el-form-item label="安装地址" prop="address">
-            <el-input v-model="mainForm.address" placeholder="请输入安装地址"></el-input>
+            <el-input v-model="mainForm.address" placeholder="请输入安装地址" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="8" :lg="8">
           <el-form-item label="文件编号" prop="fileNo">
-            <el-input v-model="mainForm.fileNo" placeholder="请输入文件编号"></el-input>
+            <el-input v-model="mainForm.fileNo" placeholder="请输入文件编号" />
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="24" :lg="16" v-if="!isDealer">
+        <el-col v-if="!isDealer" :xs="24" :sm="24" :lg="16">
           <el-form-item label="格力内部备注" prop="greeRemark">
-            <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注"></el-input>
+            <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注" />
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8" v-if="!isDealer">
+        <el-col v-if="!isDealer" :xs="24" :sm="12" :lg="8">
           <el-form-item label="权限分类" prop="power">
             <el-select v-model="mainForm.power" placeholder="选择权限分类" size="small" clearable style="width: 100%">
               <el-option
                 v-for="item in powerList"
-                :key="item.dictCode" :label="item.dictValue" :value="item.dictCode">
-              </el-option>
+                :key="item.dictCode"
+                :label="item.dictValue"
+                :value="item.dictCode"
+              />
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
           <el-form-item label="格力回复" prop="greeReply">
-            <el-input v-model="mainForm.greeReply" :placeholder="isDealer ? '' : '请输入格力回复'" :disabled="isDealer"></el-input>
+            <el-input v-model="mainForm.greeReply" :placeholder="isDealer ? '' : '请输入格力回复'" :disabled="isDealer" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
           <el-form-item label="备注" prop="remark">
-            <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
+            <el-input v-model="mainForm.remark" placeholder="请输入备注" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="制单人" prop="createMan">
-            <el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled></el-input>
+            <el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
@@ -176,8 +184,8 @@
               disabled
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="选择日期">
-            </el-date-picker>
+              placeholder="选择日期"
+            />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
@@ -187,8 +195,8 @@
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="选择日期">
-            </el-date-picker>
+              placeholder="选择日期"
+            />
           </el-form-item>
         </el-col>
       </el-row>
@@ -198,7 +206,7 @@
       <div class="title">货品信息</div>
       <div>
         <el-button type="primary" size="mini" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
-        <el-divider direction="vertical"></el-divider>
+        <el-divider direction="vertical" />
         <!-- <ImportButton :imUrl="'engin-info-order/import-item'" @importSuccess="getImportList" :isIcon="false" style="display: inline-block" />
         <ExportButton :exUrl="'engin-info-order/download'" :exParams="{}" :exText="'下载导入模版'" :isIcon="false" style="display: inline-block" /> -->
       </div>
@@ -206,49 +214,49 @@
 
     <div class="table" style="margin-top: 20px">
       <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="序号" type="index" width="50" />
         <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="mini" clearable style="width: 100%" @change="changeSaleType(scope.$index)" v-if="listItem">
-              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+            <el-select v-if="listItem" v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="mini" clearable style="width: 100%" @change="changeSaleType(scope.$index)">
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
             </el-select>
-            <div v-else>{{scope.row.saleTypeName}}</div>
+            <div v-else>{{ scope.row.saleTypeName }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.specification" size="mini" v-if="listItem"></el-input>
-            <div v-else>{{scope.row.specification}}</div>
+            <el-input v-if="listItem" v-model="scope.row.specification" size="mini" />
+            <div v-else>{{ scope.row.specification }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent ></el-input>
+            <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent ></el-input>
+            <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
         <el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{(scope.row.price || 0) * (scope.row.qty || 0)}}
+            {{ (scope.row.price || 0) * (scope.row.qty || 0) }}
           </template>
         </el-table-column>
         <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.remark" size="small"></el-input>
+            <el-input v-model="scope.row.remark" size="small" />
           </template>
         </el-table-column>
-        <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip />
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
-            <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
+            <el-button type="text" @click="deleteItem(scope.$index,scope.row.cid)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -257,8 +265,8 @@
     <div class="page-footer">
       <div class="footer">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
-<!--        <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>-->
-        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+        <!--        <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>-->
+        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -270,30 +278,30 @@
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="salesType">
               <el-select v-model="goodsScreenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
-                <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+                <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="proNum">
-              <el-input v-model="goodsScreenForm.proNum" placeholder="请输入产品编码"></el-input>
+              <el-input v-model="goodsScreenForm.proNum" placeholder="请输入产品编码" />
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="proName">
-              <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称"></el-input>
+              <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称" />
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="proModel">
-              <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号"></el-input>
+              <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号" />
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="6" :lg="6">
-            <el-form-item prop="price1"  style="display: flex">
-              <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%"></el-input>
+            <el-form-item prop="price1" style="display: flex">
+              <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%" />
               <span> - </span>
-              <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%"></el-input>
+              <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%" />
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="18" :lg="18" class="tr">
@@ -308,23 +316,23 @@
       <div class="tables">
         <div class="table">
           <el-table :data="leftGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="leftSelectionChange">
-            <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleName" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" type="selection" width="55" :selectable="checkboxSelect" />
+            <el-table-column align="center" label="销售类型" prop="saleName" show-overflow-tooltip />
+            <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
+            <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
           </el-table>
           <div class="pagination clearfix" style="margin-top: 10px">
             <div class="fr">
               <el-pagination
-                @current-change="handleTableCurrentChange"
                 :current-page="currentPage"
                 :page-size="10"
                 background
                 layout="prev, pager, next"
-                :total="listTotal">
-              </el-pagination>
+                :total="listTotal"
+                @current-change="handleTableCurrentChange"
+              />
             </div>
           </div>
         </div>
@@ -336,18 +344,17 @@
         </div>
         <div class="table">
           <el-table :data="rightGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="rightSelectionChange">
-            <el-table-column align="center" type="selection" width="55"></el-table-column>
-            <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
-                                <el-table-column align="center" prop="saleName" label="销售类型" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" type="selection" width="55" />
+            <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
+            <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
+            <el-table-column align="center" prop="saleName" label="销售类型" show-overflow-tooltip />
 
           </el-table>
         </div>
       </div>
 
-
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDialog">取 消</el-button>
         <el-button type="primary" @click="submitAddGoods">确 定</el-button>
@@ -358,7 +365,7 @@
 </template>
 
 <script>
-import { getEnginDetail, getRetailProductList, addEngin, editEngin, submitEngin } from "@/api/supply/engin";
+import { getEnginDetail, getRetailProductList, addEngin, editEngin, submitEngin } from '@/api/supply/engin'
 import { getDictList, getTypeList, getSalesmanList, getDealerList } from '@/api/common'
 
 export default {
@@ -394,7 +401,7 @@ export default {
         power: '',
         greeRemark: '',
         greeReply: '',
-        fileNo: '',
+        fileNo: ''
       },
       mainFormRules: {
         salesMan: [{ required: true, message: '请选择业务员', trigger: 'change' }],
@@ -405,23 +412,23 @@ export default {
         address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
         enginNum: [{ required: true, message: '请输入工程编号', trigger: 'blur' }],
         loginType: [{ required: true, message: '请输入工程登录类型', trigger: 'blur' }],
-        tradeCategory: [{ required: true, message: '请选择行业类别', trigger: 'change' }],
+        tradeCategory: [{ required: true, message: '请选择行业类别', trigger: 'change' }]
       },
       loginTypeList: [],
       powerList: [],
       machineTypeList: [],
       tradeCategoryList: [
-        {value: '房地产', label: '房地产'},
-        {value: '公共建筑', label: '公共建筑'},
-        {value: '工业制造', label: '工业制造'},
-        {value: '商业项目', label: '商业项目'},
-        {value: '采暖及清洁能源', label: '采暖及清洁能源'},
-        {value: '轨道交通', label: '轨道交通'},
-        {value: '数据通讯', label: '数据通讯'},
-        {value: '冷冻冷藏', label: '冷冻冷藏'},
-        {value: '高端制造', label: '高端制造'},
-        {value: '医院医疗', label: '医院医疗'},
-        {value: '其他', label: '其他'},
+        { value: '房地产', label: '房地产' },
+        { value: '公共建筑', label: '公共建筑' },
+        { value: '工业制造', label: '工业制造' },
+        { value: '商业项目', label: '商业项目' },
+        { value: '采暖及清洁能源', label: '采暖及清洁能源' },
+        { value: '轨道交通', label: '轨道交通' },
+        { value: '数据通讯', label: '数据通讯' },
+        { value: '冷冻冷藏', label: '冷冻冷藏' },
+        { value: '高端制造', label: '高端制造' },
+        { value: '医院医疗', label: '医院医疗' },
+        { value: '其他', label: '其他' }
       ],
 
       typeList: [],
@@ -436,7 +443,7 @@ export default {
         proModel: '',
         price1: '',
         price2: '',
-        salesType: '',
+        salesType: ''
       },
       currentPage: 1,
       listTotal: 0,
@@ -446,87 +453,89 @@ export default {
 
       leftSelection: [],
       rightSelection: [],
+      examineStatus: ''
     }
   },
 
   computed: {
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   async created() {
-    await this.getSalesmanList();
-    this.getDictList();
-    this.getTypeList();
-    this.getDealerList();
-    if(this.listItem) {
-      this.getDetail();
-    }else {
-      this.mainForm.jxsNum = JSON.parse(localStorage.getItem("supply_user")).customerNumber;
-      this.mainForm.jxsName = JSON.parse(localStorage.getItem("supply_user")).customerName;
-      this.mainForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
-      this.mainForm.createDate = this.getDate(0);
-      this.mainForm.contractDate = this.getDate(1);
+    await this.getSalesmanList()
+    this.getDictList()
+    this.getTypeList()
+    this.getDealerList()
+    if (this.listItem) {
+      this.getDetail()
+    } else {
+      this.mainForm.jxsNum = JSON.parse(localStorage.getItem('supply_user')).customerNumber
+      this.mainForm.jxsName = JSON.parse(localStorage.getItem('supply_user')).customerName
+      this.mainForm.createMan = JSON.parse(localStorage.getItem('supply_user')).nickName
+      this.mainForm.createDate = this.getDate(0)
+      this.mainForm.contractDate = this.getDate(1)
     }
   },
 
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+      this.$emit('backListFormDetail')
     },
 
     getDate(addYear) {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear() + addYear;
-      var month = date.getMonth() + 1;
-      var strDate = date.getDate();
+      var date = new Date()
+      var seperator1 = '-'
+      var year = date.getFullYear() + addYear
+      var month = date.getMonth() + 1
+      var strDate = date.getDate()
       if (month >= 1 && month <= 9) {
-          month = "0" + month;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-          strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate;
-      return currentdate;
+      var currentdate = year + seperator1 + month + seperator1 + strDate
+      return currentdate
     },
 
     // 获取详情
     getDetail() {
-      getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
-        let data = res.data;
-        this.mainForm.orderNum = data.enginInfoNo;
-        this.mainForm.orderDate = data.orderDate;
+      getEnginDetail({ id: this.listItem.enginInfoId }).then(res => {
+        const data = res.data
+        this.mainForm.orderNum = data.enginInfoNo
+        this.mainForm.orderDate = data.orderDate
         // this.mainForm.mainId = data.productCategoryId;
-        this.mainForm.jxsNum = data.customerNumber;
-        this.mainForm.enginName = data.projectName;
-        this.mainForm.machineType = data.machineType;
-        this.mainForm.jxsName = data.customerName;
-        this.mainForm.company = data.useUnit;
-        this.mainForm.tradeCategory = data.tradeCategory;
-        this.mainForm.address = data.installAddress;
-        this.mainForm.enginNum = data.projectNo;
-        this.mainForm.factoryNum = data.enginFactoryNo;
-        this.mainForm.loginType = data.enginSignType;
-        this.mainForm.linkman = data.linkman;
-        this.mainForm.phone = data.phone;
-        this.mainForm.tel = data.tel;
-        this.mainForm.remark = data.remark;
-        this.mainForm.salesMan = data.serviceId;
-        this.mainForm.createMan = data.createName;
-        this.mainForm.createDate = data.createTime;
-        this.mainForm.contractDate = data.contractExpireDate;
-        this.mainForm.power = data.powerCategory;
-        this.mainForm.greeRemark = data.geLiInerNote;
-        this.mainForm.greeReply = data.geLiNote;
-        this.mainForm.fileNo = data.fileNo;
-
+        this.mainForm.jxsNum = data.customerNumber
+        this.mainForm.enginName = data.projectName
+        this.mainForm.machineType = data.machineType
+        this.mainForm.jxsName = data.customerName
+        this.mainForm.company = data.useUnit
+        this.mainForm.tradeCategory = data.tradeCategory
+        this.mainForm.address = data.installAddress
+        this.mainForm.enginNum = data.projectNo
+        this.mainForm.factoryNum = data.enginFactoryNo
+        this.mainForm.loginType = data.enginSignType
+        this.mainForm.linkman = data.linkman
+        this.mainForm.phone = data.phone
+        this.mainForm.tel = data.tel
+        this.mainForm.remark = data.remark
+        this.mainForm.salesMan = data.serviceId
+        this.mainForm.createMan = data.createName
+        this.mainForm.createDate = data.createTime
+        this.mainForm.contractDate = data.contractExpireDate
+        this.mainForm.power = data.powerCategory
+        this.mainForm.greeRemark = data.geLiInerNote
+        this.mainForm.greeReply = data.geLiNote
+        this.mainForm.fileNo = data.fileNo
+        this.examineStatus = data.examineStatus
         data.items.forEach(item => {
-          item.cantDel = true;
+          item.cantDel = true
+          item.cid = item.id
         })
-        this.goodsList = data.items;
+        this.goodsList = data.items
       })
     },
 
@@ -534,26 +543,26 @@ export default {
     getDealerList() {
       getDealerList({
         pageNum: 1,
-        pageSize: -1,
+        pageSize: -1
         // bindUser: false
       }).then(res => {
-        this.dealerList = res.data.records;
+        this.dealerList = res.data.records
       })
     },
 
     // 获取产品大类列表
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
+      getDictList({ sysDictEnum: 'PRODUCT_TYPE' }).then(res => {
+        this.typeList = res.data
       })
-      getDictList({sysDictEnum: 'MACHINE_TYPE'}).then(res => {
-        this.machineTypeList = res.data;
+      getDictList({ sysDictEnum: 'MACHINE_TYPE' }).then(res => {
+        this.machineTypeList = res.data
       })
-      getDictList({sysDictEnum: 'POWER_CATEGORY'}).then(res => {
-        this.powerList = res.data;
+      getDictList({ sysDictEnum: 'POWER_CATEGORY' }).then(res => {
+        this.powerList = res.data
       })
-      getDictList({sysDictEnum: 'SIGN_TYPE'}).then(res => {
-        this.loginTypeList = res.data;
+      getDictList({ sysDictEnum: 'SIGN_TYPE' }).then(res => {
+        this.loginTypeList = res.data
       })
     },
 
@@ -561,10 +570,10 @@ export default {
     getTypeList() {
       getTypeList({
         pageNum: 1,
-        pageSize: -1,
+        pageSize: -1
       }).then((res) => {
-        this.salesTypeList = res.data.records;
-      });
+        this.salesTypeList = res.data.records
+      })
     },
 
     async getSalesmanList() {
@@ -572,30 +581,30 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      });
-      this.salesmanList = res.data.records;
+        status: true
+      })
+      this.salesmanList = res.data.records
     },
 
     changeDealer() {
-      if(this.mainForm.jxsNum) {
-        let jxsItem = this.dealerList.find(o => o.number == this.mainForm.jxsNum);
-        this.mainForm.jxsName = jxsItem.name;
-        this.mainForm.jxsId = jxsItem.id;
-      }else {
-        this.mainForm.jxsName = '';
-        this.mainForm.jxsId = '';
+      if (this.mainForm.jxsNum) {
+        const jxsItem = this.dealerList.find(o => o.number == this.mainForm.jxsNum)
+        this.mainForm.jxsName = jxsItem.name
+        this.mainForm.jxsId = jxsItem.id
+      } else {
+        this.mainForm.jxsName = ''
+        this.mainForm.jxsId = ''
       }
     },
 
     changeSaleType(index) {
-      if(this.goodsList[index].saleTypeId) {
-        let obj = this.salesTypeList.find(o => o.id == this.goodsList[index].saleTypeId);
-        this.goodsList[index].saleTypeName = obj.saleName;
-        this.goodsList[index].saleTypeCode = obj.saleCode;
-      }else {
-        this.goodsList[index].saleTypeName = '';
-        this.goodsList[index].saleTypeCode = '';
+      if (this.goodsList[index].saleTypeId) {
+        const obj = this.salesTypeList.find(o => o.id == this.goodsList[index].saleTypeId)
+        this.goodsList[index].saleTypeName = obj.saleName
+        this.goodsList[index].saleTypeCode = obj.saleCode
+      } else {
+        this.goodsList[index].saleTypeName = ''
+        this.goodsList[index].saleTypeCode = ''
       }
     },
 
@@ -610,38 +619,38 @@ export default {
         specification: this.goodsScreenForm.proModel,
         price1: this.goodsScreenForm.price1,
         price2: this.goodsScreenForm.price2,
-        customerId:this.listItem ?this.listItem.customerId :'' ,
+        customerId: this.listItem ? this.listItem.customerId : ''
       }).then(res => {
-        let oldGoodsList = this.goodsList;
-        let newGoodsList = res.data.records;
-        for(let i = 0; i < oldGoodsList.length; i++) {
-          let oldItem = oldGoodsList[i]
-          for(let j = 0; j < newGoodsList.length; j++) {
-            let newItem = newGoodsList[j]
-            if(newItem.id === oldItem.id){
-              newGoodsList[j].selected = true;
-              break;
+        const oldGoodsList = this.goodsList
+        const newGoodsList = res.data.records
+        for (let i = 0; i < oldGoodsList.length; i++) {
+          const oldItem = oldGoodsList[i]
+          for (let j = 0; j < newGoodsList.length; j++) {
+            const newItem = newGoodsList[j]
+            if (newItem.id === oldItem.id) {
+              newGoodsList[j].selected = true
+              break
             }
           }
         }
         res.data.records.forEach(item => {
-          item.materialName = item.name;
-          item.materialCode = item.number;
-          item.saleTypeName = item.saleName;
-          item.unit = item.baseUnit;
-          item.price = item.batchPrice;
-          item.tax = item.taxRate;
-          item.isDirectTransfer = false;
-          item.directTransferQty = '';
-          item.status1 = '';
-          item.status2 = '';
-          item.rebateAmount = '';
-          item.rebateRate = '';
-          item.productPriceId = item.id;
+          item.materialName = item.name
+          item.materialCode = item.number
+          item.saleTypeName = item.saleName
+          item.unit = item.baseUnit
+          item.price = item.batchPrice
+          item.tax = item.taxRate
+          item.isDirectTransfer = false
+          item.directTransferQty = ''
+          item.status1 = ''
+          item.status2 = ''
+          item.rebateAmount = ''
+          item.rebateRate = ''
+          item.productPriceId = item.id
           // item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
-        });
-        this.leftGoodsList = res.data.records;
-        this.listTotal = res.data.total;
+        })
+        this.leftGoodsList = res.data.records
+        this.listTotal = res.data.total
       })
     },
 
@@ -649,87 +658,87 @@ export default {
     checkboxSelect(row, rowIndex) {
       if (row.selected) {
         return false // 禁用
-      }else{
+      } else {
         return true // 不禁用
       }
     },
 
     // 点击 选择商品
     openDialog() {
-      this.isShowGoodsDialog = true;
-      this.getGoodsList();
+      this.isShowGoodsDialog = true
+      this.getGoodsList()
     },
 
     // 提交筛选表单
     submitGoodsScreenForm() {
-      this.currentPage = 1;
-      this.getGoodsList();
+      this.currentPage = 1
+      this.getGoodsList()
     },
 
     // 重置筛选表单
     resetGoodsScreenForm() {
-      this.$refs.goodsScreenForm.resetFields();
-      this.currentPage = 1;
-      this.getGoodsList();
+      this.$refs.goodsScreenForm.resetFields()
+      this.currentPage = 1
+      this.getGoodsList()
     },
 
     // 更改列表当前页
     handleTableCurrentChange(val) {
-      this.currentPage = val;
-      this.getGoodsList();
+      this.currentPage = val
+      this.getGoodsList()
     },
 
     // 关闭 弹窗
     closeDialog() {
-      this.isShowGoodsDialog = false;
+      this.isShowGoodsDialog = false
     },
 
     // 左侧列表选择
     leftSelectionChange(val) {
-      this.leftSelection = val;
+      this.leftSelection = val
     },
 
     // 右侧列表选择
     rightSelectionChange(val) {
-      this.rightSelection = val;
+      this.rightSelection = val
     },
 
     // 数组去重
     delRepeat(arr1, arr2) {
-      let allArr = arr1.concat(arr2); // 两个数组对象合并
-      let newArr = []; // 存放去重后数据的新数组
-      for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
-        let flag = true;  // 建立标记,判断数据是否重复,true为不重复
-        for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
-          if(allArr[i].id == newArr[j].id){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
-            flag = false;
+      const allArr = arr1.concat(arr2) // 两个数组对象合并
+      const newArr = [] // 存放去重后数据的新数组
+      for (let i = 0; i < allArr.length; i++) { // 循环allArr数组对象的内容
+        let flag = true // 建立标记,判断数据是否重复,true为不重复
+        for (let j = 0; j < newArr.length; j++) { // 循环新数组的内容
+          if (allArr[i].id == newArr[j].id) { // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+            flag = false
           }
         }
-        if(flag){ // 判断是否重复
-          newArr.push(allArr[i]); // 不重复的放入新数组。  新数组的内容会继续进行上边的循环。
+        if (flag) { // 判断是否重复
+          newArr.push(allArr[i]) // 不重复的放入新数组。  新数组的内容会继续进行上边的循环。
         }
       }
-      return newArr;
+      return newArr
     },
 
     // 全部添加
     addAllGoods() {
-      this.rightGoodsList = this.delRepeat(this.leftGoodsList, this.rightGoodsList);
+      this.rightGoodsList = this.delRepeat(this.leftGoodsList, this.rightGoodsList)
     },
 
     // 添加
     addGoods() {
-      this.rightGoodsList = this.delRepeat(this.leftSelection, this.rightGoodsList);
+      this.rightGoodsList = this.delRepeat(this.leftSelection, this.rightGoodsList)
     },
 
     // 删除
     deleteGoods() {
-      let rightGoodsList = this.rightGoodsList;
-      let rightSelection = this.rightSelection;
-      for(let i = 0; i < rightGoodsList.length; i++) {
-        for(let j = 0; j < rightSelection.length; j++) {
-          if(rightSelection[j].materialId == rightGoodsList[i].materialId){
-            this.rightGoodsList.splice(i, 1);
+      const rightGoodsList = this.rightGoodsList
+      const rightSelection = this.rightSelection
+      for (let i = 0; i < rightGoodsList.length; i++) {
+        for (let j = 0; j < rightSelection.length; j++) {
+          if (rightSelection[j].materialId == rightGoodsList[i].materialId) {
+            this.rightGoodsList.splice(i, 1)
           }
         }
       }
@@ -737,51 +746,59 @@ export default {
 
     // 全部删除
     deleteAllGoods() {
-      this.rightGoodsList = [];
+      this.rightGoodsList = []
     },
 
     // 确定 添加产品
     submitAddGoods() {
       // this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
-      this.goodsList = this.goodsList.concat(this.rightGoodsList);
-      this.isShowGoodsDialog = false;
-      this.leftGoodsList = [];
-      this.rightGoodsList = [];
+
+      this.goodsList = this.goodsList.concat(this.rightGoodsList)
+      this.goodsList.forEach(k => {
+        k.cid = ''
+      })
+      this.isShowGoodsDialog = false
+      this.leftGoodsList = []
+      this.rightGoodsList = []
     },
 
     // 删除产品
-    deleteItem(index) {
-      this.goodsList.splice(index, 1);
+    deleteItem(index, id) {
+      if (this.listItem && this.examineStatus === 'OK' && id) {
+        this.$errorMsg('不能删除')
+        return
+      }
+      this.goodsList.splice(index, 1)
     },
 
     // 导入产品
     getImportList(data) {
-      this.goodsList = this.goodsList.concat(data);
+      this.goodsList = this.goodsList.concat(data)
     },
 
     clickSubmitForm(type) {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {
-          for(let i=0; i<this.goodsList.length; i++) {
-            if(!this.goodsList[i].saleTypeId) {
-              this.$errorMsg('请选择销售类型');
-              return;
+          for (let i = 0; i < this.goodsList.length; i++) {
+            if (!this.goodsList[i].saleTypeId) {
+              this.$errorMsg('请选择销售类型')
+              return
             }
-            if(!this.goodsList[i].materialNumber) {
-              this.$errorMsg('请选择产品');
-              return;
+            if (!this.goodsList[i].materialNumber) {
+              this.$errorMsg('请选择产品')
+              return
             }
           }
 
-          let goodsList = JSON.parse(JSON.stringify(this.goodsList));
+          const goodsList = JSON.parse(JSON.stringify(this.goodsList))
 
           goodsList.forEach(item => {
-            delete item.productList;
-            delete item.id;
+            delete item.productList
+            delete item.id
           })
 
-          let saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : '';
-          let params = {
+          const saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : ''
+          const params = {
             // orderDate: this.mainForm.orderDate + ' 00:00:00',
             // mainId: this.mainForm.mainId,
             projectName: this.mainForm.enginName,
@@ -805,41 +822,41 @@ export default {
             fileNo: this.mainForm.fileNo,
             items: goodsList
           }
-          if(type === 1) {
-            if(this.listItem) {
-              params.enginInfoId = this.listItem.enginInfoId;
+          if (type === 1) {
+            if (this.listItem) {
+              params.enginInfoId = this.listItem.enginInfoId
               editEngin(params).then(res => {
-                this.$successMsg('编辑成功');
-                this.goBack();
-                this.$parent.getList();
+                this.$successMsg('编辑成功')
+                this.goBack()
+                this.$parent.getList()
               })
-            }else {
-              params.customerNumber = this.mainForm.jxsNum;
-              params.customerName = this.mainForm.jxsName;
-              params.customerId = this.mainForm.jxsId;
+            } else {
+              params.customerNumber = this.mainForm.jxsNum
+              params.customerName = this.mainForm.jxsName
+              params.customerId = this.mainForm.jxsId
               addEngin(params).then(res => {
-                this.$successMsg('保存成功');
-                this.goBack();
-                this.$parent.getList();
+                this.$successMsg('保存成功')
+                this.goBack()
+                this.$parent.getList()
               })
             }
-          }else {
-            if(this.listItem) {
-              params.enginInfoId = this.listItem.enginInfoId;
-            }else {
-              params.customerNumber = this.mainForm.jxsNum;
-              params.customerName = this.mainForm.jxsName;
-              params.customerId = this.mainForm.jxsId;
+          } else {
+            if (this.listItem) {
+              params.enginInfoId = this.listItem.enginInfoId
+            } else {
+              params.customerNumber = this.mainForm.jxsNum
+              params.customerName = this.mainForm.jxsName
+              params.customerId = this.mainForm.jxsId
             }
             submitEngin(params).then(res => {
-              this.$successMsg('提交审核成功');
-              this.goBack();
-              this.$parent.getList();
+              this.$successMsg('提交审核成功')
+              this.goBack()
+              this.$parent.getList()
             })
           }
         }
       })
-    },
+    }
   }
 }
 </script>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 643 - 158
src/views/supply/engin/components/home_detail.vue


+ 238 - 228
src/views/supply/engin/engin_list.vue

@@ -8,18 +8,18 @@
             <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item prop="status" label-width="0">
                 <el-checkbox-group v-model="screenForm.status" @change="getList()">
-                  <el-checkbox-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{item.label}}</el-checkbox-button>
+                  <el-checkbox-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{ item.label }}</el-checkbox-button>
                 </el-checkbox-group>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="工程登录编号" prop="orderNum">
-                <el-input v-model="screenForm.orderNum" placeholder="请输入工程登录编号"></el-input>
+                <el-input v-model="screenForm.orderNum" placeholder="请输入工程登录编号" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="工程编码" prop="enginNum">
-                <el-input v-model="screenForm.enginNum" placeholder="请输入工程编码"></el-input>
+                <el-input v-model="screenForm.enginNum" placeholder="请输入工程编码" />
               </el-form-item>
             </el-col>
             <!-- <el-col :xs="24" :sm="12" :lg="6">
@@ -29,7 +29,7 @@
             </el-col> -->
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="项目名称" prop="enginName">
-                <el-input v-model="screenForm.enginName" placeholder="请输入项目名称"></el-input>
+                <el-input v-model="screenForm.enginName" placeholder="请输入项目名称" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -41,28 +41,28 @@
                   style="width: 100%;"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
-                  end-placeholder="结束日期">
-                </el-date-picker>
+                  end-placeholder="结束日期"
+                />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商" prop="dealer">
-                <el-input v-model="screenForm.dealer" placeholder="请输入经销商"></el-input>
+                <el-input v-model="screenForm.dealer" placeholder="请输入经销商" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="使用单位" prop="company">
-                <el-input v-model="screenForm.company" placeholder="请输入使用单位"></el-input>
+                <el-input v-model="screenForm.company" placeholder="请输入使用单位" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="制表人" prop="createMan">
-                <el-input v-model="screenForm.createMan" placeholder="请输入制表人"></el-input>
+                <el-input v-model="screenForm.createMan" placeholder="请输入制表人" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="审核人" prop="examineMan">
-                <el-input v-model="screenForm.examineMan" placeholder="请输入审核人"></el-input>
+                <el-input v-model="screenForm.examineMan" placeholder="请输入审核人" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -72,26 +72,26 @@
                     v-for="item in salesmanList"
                     :key="item.adminUserId"
                     :label="item.nickName"
-                    :value="item.adminUserId">
-                  </el-option>
+                    :value="item.adminUserId"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="规格型号" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+                <el-input v-model="screenForm.model" placeholder="请输入规格型号" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="是否直调" prop="isDirectTransfer">
-                <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直"   style="width: 100%">
-                  <el-option :value="null" label="默认"></el-option>
+                <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直" style="width: 100%">
+                  <el-option :value="null" label="默认" />
                   <el-option
                     v-for="item in transfer"
                     :key="item.value"
                     :label="item.label"
-                    :value="item.value">
-                  </el-option>
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -108,10 +108,10 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button size="mini" type="primary" icon="el-icon-plus" @click="toForm()" v-if="$checkBtnRole('add', $route.meta.roles)">新增</el-button>
+            <el-button v-if="$checkBtnRole('add', $route.meta.roles)" size="mini" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
           </div>
           <div class="fr">
-            <ExportButton :exUrl="'engin-info-order/export'" :exParams="exParams" />
+            <ExportButton :ex-url="'engin-info-order/export'" :ex-params="exParams" />
           </div>
         </div>
         <div class="table">
@@ -124,136 +124,144 @@
             highlight-current-row
             stripe
             show-summary
-            :summary-method="$getSummaries">
+            :summary-method="$getSummaries"
+          >
             <el-table-column align="left" label="审核状态" sortable prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.examineStatus | statusFilter}}
+                {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
             <el-table-column align="left" label="工程登录编号" sortable prop="enginInfoNo" min-width="150" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.enginInfoNo" />
-                <span>{{scope.row.enginInfoNo}}</span>
+                <CopyButton :copy-text="scope.row.enginInfoNo" />
+                <span>{{ scope.row.enginInfoNo }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="订单日期" sortable prop="orderDate" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <div>
-                  <span>{{scope.row.orderDate | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" ></el-button>
+                  <span>{{ scope.row.orderDate | dateToDayFilter }}</span>
+                  <el-button v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" />
                 </div>
               </template>
             </el-table-column>
 
             <el-table-column align="left" label="经销商编码" sortable prop="customerNumber" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.customerNumber" />
-                <span>{{scope.row.customerNumber}}</span>
+                <CopyButton :copy-text="scope.row.customerNumber" />
+                <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="经销商名称" sortable prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.customerName" />
-                <span>{{scope.row.customerName}}</span>
+                <CopyButton :copy-text="scope.row.customerName" />
+                <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="项目类别" sortable prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="使用单位" sortable prop="useUnit" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="安装地址" sortable prop="installAddress" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="项目类别" sortable prop="projectName" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="使用单位" sortable prop="useUnit" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="安装地址" sortable prop="installAddress" min-width="160" show-overflow-tooltip />
             <el-table-column align="left" label="物料编码" sortable prop="materialNumber" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialNumber" />
-                <span>{{scope.row.materialNumber}}</span>
+                <CopyButton :copy-text="scope.row.materialNumber" />
+                <span>{{ scope.row.materialNumber }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="产品编码" sortable prop="materialOldNumber" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{scope.row.materialOldNumber}}</span>
+                <CopyButton :copy-text="scope.row.materialOldNumber" />
+                <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="产品名称" sortable prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
-                <span>{{scope.row.materialName}}</span>
+                <CopyButton :copy-text="scope.row.materialName" />
+                <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="规格型号" sortable prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
-                <span>{{scope.row.specification}}</span>
+                <CopyButton :copy-text="scope.row.specification" />
+                <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="数量" prop="qty" min-width="100" sortable show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="已订数量" prop="hasOrderQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="数量" prop="qty" min-width="100" sortable show-overflow-tooltip />
+            <el-table-column align="right" label="已订数量" prop="hasOrderQty" min-width="100" show-overflow-tooltip />
             <el-table-column align="right" label="可订数量" prop="compute_kdQty" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ computeAllowQty(scope.row.qty, scope.row.hasOrderQty)}}
+                {{ computeAllowQty(scope.row.qty, scope.row.hasOrderQty) }}
               </template>
             </el-table-column>
             <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.price | numToFixed}}
+                {{ scope.row.price | numToFixed }}
               </template>
             </el-table-column>
             <el-table-column align="right" label="金额" prop="totalAmount" min-width="100" sortable show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.totalAmount | numToFixed}}
+                {{ scope.row.totalAmount | numToFixed }}
               </template>
             </el-table-column>
-             <el-table-column align="left" label="表体业务员" sortable prop="itemServiceName" min-width="110" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="表头业务员" sortable prop="serviceName" min-width="110" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="备注" sortable prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="制表人" sortable prop="createName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="制表日期" sortable prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="审核人" sortable prop="confirmName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="审核日期" sortable prop="confirmTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="表体业务员" sortable prop="itemServiceName" min-width="110" show-overflow-tooltip />
+            <el-table-column align="left" label="表头业务员" sortable prop="serviceName" min-width="110" show-overflow-tooltip />
+            <el-table-column align="left" label="备注" sortable prop="remark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="制表人" sortable prop="createName" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="制表日期" sortable prop="createTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核人" sortable prop="confirmName" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="审核日期" sortable prop="confirmTime" min-width="160" show-overflow-tooltip />
             <el-table-column align="center" label="操作" width="210" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
                   style="margin-right: 10px;"
                   title="确定申请吗?"
                   @onConfirm="handleSubmit(scope.row.enginInfoId)"
-                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
+                >
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
                 <el-popconfirm
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                   style="margin-right: 10px;"
                   title="确定撤回吗?"
                   @onConfirm="handleWithdraw(scope.row.enginInfoId)"
-                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
+                >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
                 <el-popconfirm
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
                   style="margin-right: 10px;"
                   title="确定弃审吗?"
                   @onConfirm="handleAbandon(scope.row.enginInfoId)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
                 <el-button
+                  v-if="$checkBtnRole('edit', $route.meta.roles) && (!isDealer || (isDealer && scope.row.examineStatus === 'SAVE'))"
                   type="text"
                   @click="toForm(scope.row)"
-                  v-if="$checkBtnRole('edit', $route.meta.roles) && (!isDealer || (isDealer && scope.row.examineStatus === 'SAVE'))">
+                >
                   编辑
                 </el-button>
                 <el-button
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                   type="text"
                   @click="toExamine(scope.row)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">
+                >
                   审批
                 </el-button>
                 <el-button
                   type="text"
-                  @click="toDetail(scope.row)">
+                  @click="toDetail(scope.row)"
+                >
                   详情
                 </el-button>
                 <el-popconfirm
+                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
                   style="margin-left: 10px;"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.enginInfoId)"
-                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'">
+                >
                   <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
                 </el-popconfirm>
               </template>
@@ -264,34 +272,34 @@
       <div class="pagination clearfix">
         <div class="fr">
           <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal">
-          </el-pagination>
+            :total="listTotal"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
         </div>
       </div>
     </div>
 
-    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
+    <EditDateDialog :is-show.sync="isShowEditDateDialog" :date-form.sync="dateForm" />
 
-    <EnginDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-    <EnginForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
-    <EnginExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
+    <EnginDetail v-if="isShowDetail" :list-item="queryItem" @backListFormDetail="backList" />
+    <EnginForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
+    <EnginExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
 
   </div>
 </template>
 
 <script>
-import { getEnginList, applyEngin, withdrawEngin, deleteEngin, editDateEngin, abandonEngin } from "@/api/supply/engin";
+import { getEnginList, applyEngin, withdrawEngin, deleteEngin, editDateEngin, abandonEngin } from '@/api/supply/engin'
 import { getSalesmanList } from '@/api/common'
-import EnginDetail from "@/views/supply/engin/components/engin_detail";
-import EnginForm from "@/views/supply/engin/components/engin_form";
-import EnginExamine from "@/views/supply/engin/components/engin_examine";
-import EditDateDialog from "@/components/Common/edit-date-dialog";
+import EnginDetail from '@/views/supply/engin/components/engin_detail'
+import EnginForm from '@/views/supply/engin/components/engin_form'
+import EnginExamine from '@/views/supply/engin/components/engin_examine'
+import EditDateDialog from '@/components/Common/edit-date-dialog'
 
 let that
 export default {
@@ -299,11 +307,11 @@ export default {
     EnginDetail,
     EnginForm,
     EnginExamine,
-    EditDateDialog,
+    EditDateDialog
   },
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find(o => o.value == val);
+      const obj = that.statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
@@ -328,20 +336,20 @@ export default {
         salesMan: '',
         model: '',
         orderDate: '',
-        isDirectTransfer:null
+        isDirectTransfer: null
 
       },
       statusList: [
         { label: '已保存', value: 'SAVE' },
         { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
+        { label: '审核通过', value: 'OK' }
         //  // { label: '审核驳回', value: 'FAIL' },,
         // { label: '已关闭', value: 'CLOSE' },
       ],
       salesmanList: [],
-      transfer:[
-        {label:'是',value:true},
-        {label:'否',value:false}
+      transfer: [
+        { label: '是', value: true },
+        { label: '否', value: false }
       ],
       queryItem: {},
       isShowDetail: false,
@@ -351,14 +359,14 @@ export default {
       editId: null,
       isShowEditDateDialog: false,
       dateForm: {
-        date: '',
-      },
+        date: ''
+      }
     }
   },
 
   computed: {
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
     },
     exParams() {
       return {
@@ -377,18 +385,18 @@ export default {
         examineStatus: this.screenForm.status.join(','),
         serviceId: this.screenForm.salesMan,
         specification: this.screenForm.model,
-        isDirectTransfer:this.screenForm.isDirectTransfer,
+        isDirectTransfer: this.screenForm.isDirectTransfer
 
       }
-    },
+    }
   },
 
   watch: {
     dataList: {
       handler(newValue, oldValue) {
-        if(newValue && newValue.length) {
+        if (newValue && newValue.length) {
           newValue.forEach((item, index) => {
-            this.dataList[index].compute_kdQty = this.computeAllowQty(item.qty, item.hasOrderQty);
+            this.dataList[index].compute_kdQty = this.computeAllowQty(item.qty, item.hasOrderQty)
           })
         }
       },
@@ -398,173 +406,175 @@ export default {
   },
 
   beforeCreate() {
-    that = this;
+    that = this
   },
 
   created() {
-    this.getSalesmanList();
-    this.getList();
+    this.getSalesmanList()
+    this.getList()
   },
 
-  methods: {
+  methods:
+
+    {
     // 获取业务员列表
-    getSalesmanList() {
-      getSalesmanList({
-        pageNum: 1,
-        pageSize: -1,
-        isCustomer: 0,
-        status: true,
-      }).then(res => {
-        this.salesmanList = res.data.records;
-      })
-    },
+      getSalesmanList() {
+        getSalesmanList({
+          pageNum: 1,
+          pageSize: -1,
+          isCustomer: 0,
+          status: true
+        }).then(res => {
+          this.salesmanList = res.data.records
+        })
+      },
 
-    // 查询列表
-    getList() {
-      this.listLoading = true;
+      // 查询列表
+      getList() {
+        this.listLoading = true
+
+        const params = {
+          pageNum: this.currentPage,
+          pageSize: this.pageSize,
+          enginInfoNo: this.screenForm.orderNum,
+          projectNo: this.screenForm.enginNum,
+          enginSignType: this.screenForm.loginNum,
+          projectName: this.screenForm.enginName,
+          startOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[0] : '',
+          endOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[1] : '',
+          startContractExpireDate: this.screenForm.date ? this.screenForm.date[0] : '',
+          endContractExpireDate: this.screenForm.date ? this.screenForm.date[1] : '',
+          customerKeyword: this.screenForm.dealer,
+          useUnit: this.screenForm.company,
+          createName: this.screenForm.createMan,
+          confirmName: this.screenForm.examineMan,
+          examineStatus: this.screenForm.status.join(','),
+          serviceId: this.screenForm.salesMan,
+          specification: this.screenForm.model,
+          isDirectTransfer: this.screenForm.isDirectTransfer
 
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        enginInfoNo: this.screenForm.orderNum,
-        projectNo: this.screenForm.enginNum,
-        enginSignType: this.screenForm.loginNum,
-        projectName: this.screenForm.enginName,
-        startOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[0] : '',
-        endOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[1] : '',
-        startContractExpireDate: this.screenForm.date ? this.screenForm.date[0] : '',
-        endContractExpireDate: this.screenForm.date ? this.screenForm.date[1] : '',
-        customerKeyword: this.screenForm.dealer,
-        useUnit: this.screenForm.company,
-        createName: this.screenForm.createMan,
-        confirmName: this.screenForm.examineMan,
-        examineStatus: this.screenForm.status.join(','),
-        serviceId: this.screenForm.salesMan,
-        specification: this.screenForm.model,
-        isDirectTransfer:this.screenForm.isDirectTransfer,
-
-      };
-      getEnginList(params).then((res) => {
-        res.data.records.forEach(item => {
-          item.sums1 = ['qty', 'hasOrderQty', 'compute_kdQty'];
-          item.sums2 = ['totalAmount', 'price'];
+        }
+        getEnginList(params).then((res) => {
+          res.data.records.forEach(item => {
+            item.sums1 = ['qty', 'hasOrderQty', 'compute_kdQty']
+            item.sums2 = ['totalAmount', 'price']
+          })
+          this.dataList = res.data.records
+          this.listTotal = res.data.total
+          this.listLoading = false
         })
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      })
-    },
+      },
 
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
-    },
+      // 提交筛选表单
+      submitScreenForm() {
+        this.currentPage = 1
+        this.getList()
+      },
 
-    // 重置筛选表单
-    resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
-    },
+      // 重置筛选表单
+      resetScreenForm() {
+        this.$refs.screenForm.resetFields()
+        this.currentPage = 1
+        this.getList()
+      },
 
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
-    },
+      // 更改每页数量
+      handleSizeChange(val) {
+        this.pageSize = val
+        this.currentPage = 1
+        this.getList()
+      },
 
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
-    },
+      // 更改当前页
+      handleCurrentChange(val) {
+        this.currentPage = val
+        this.getList()
+      },
 
-    // 进入表单
-    toForm(item) {
-      this.queryItem = item;
-      this.isShowForm = true;
-    },
+      // 进入表单
+      toForm(item) {
+        this.queryItem = item
+        this.isShowForm = true
+      },
 
-    // 进入审批
-    toExamine(item) {
-      this.queryItem = item;
-      this.isShowExamine = true;
-    },
+      // 进入审批
+      toExamine(item) {
+        this.queryItem = item
+        this.isShowExamine = true
+      },
 
-    // 进入详情
-    toDetail(item) {
-      this.queryItem = item;
-      this.isShowDetail = true;
-    },
+      // 进入详情
+      toDetail(item) {
+        this.queryItem = item
+        this.isShowDetail = true
+      },
 
-    backList() {
-      this.queryItem = {};
-      this.isShowDetail = false;
-      this.isShowForm = false;
-      this.isShowExamine = false;
-    },
+      backList() {
+        this.queryItem = {}
+        this.isShowDetail = false
+        this.isShowForm = false
+        this.isShowExamine = false
+      },
 
-    // 申请
-    handleSubmit(id) {
-      applyEngin({id}).then(res => {
-        this.$successMsg();
-        this.getList();
-      })
-    },
+      // 申请
+      handleSubmit(id) {
+        applyEngin({ id }).then(res => {
+          this.$successMsg()
+          this.getList()
+        })
+      },
 
-    // 撤回
-    handleWithdraw(id) {
-      withdrawEngin({id}).then(res => {
-        this.$successMsg();
-        this.getList();
-      })
-    },
+      // 撤回
+      handleWithdraw(id) {
+        withdrawEngin({ id }).then(res => {
+          this.$successMsg()
+          this.getList()
+        })
+      },
 
-    // 弃审
-    handleAbandon(id) {
-      abandonEngin({id}).then(res => {
-        this.$successMsg();
-        this.getList();
-      })
-    },
+      // 弃审
+      handleAbandon(id) {
+        abandonEngin({ id }).then(res => {
+          this.$successMsg()
+          this.getList()
+        })
+      },
 
-    // 删除
-    handleDelete(id) {
-      deleteEngin({ids: id}).then(res => {
-        this.$successMsg();
-        this.getList();
-      })
-    },
+      // 删除
+      handleDelete(id) {
+        deleteEngin({ ids: id }).then(res => {
+          this.$successMsg()
+          this.getList()
+        })
+      },
 
-    // 打开 修改订单日期
-    editDate(item) {
-      this.editId = item.enginInfoId;
-      this.dateForm.date = item.orderDate.slice(0, 10);
-      this.isShowEditDateDialog = true;
-    },
+      // 打开 修改订单日期
+      editDate(item) {
+        this.editId = item.enginInfoId
+        this.dateForm.date = item.orderDate.slice(0, 10)
+        this.isShowEditDateDialog = true
+      },
 
-    // 提交 修改订单日期
-    submitDateForm() {
-      editDateEngin({
-        enginInfoId: this.editId,
-        orderDate: this.dateForm.date + ' 00:00:00',
-      }).then(res => {
-        this.isShowEditDateDialog = false;
-        this.getList();
-        this.$successMsg('修改成功');
-      })
-    },
+      // 提交 修改订单日期
+      submitDateForm() {
+        editDateEngin({
+          enginInfoId: this.editId,
+          orderDate: this.dateForm.date + ' 00:00:00'
+        }).then(res => {
+          this.isShowEditDateDialog = false
+          this.getList()
+          this.$successMsg('修改成功')
+        })
+      },
 
-    computeAllowQty(qty = 0, hasOrderQty = 0) {
-      let allowQty = qty - hasOrderQty
-      if (allowQty < 0) {
-        return 0;
+      computeAllowQty(qty = 0, hasOrderQty = 0) {
+        const allowQty = qty - hasOrderQty
+        if (allowQty < 0) {
+          return 0
+        }
+        return allowQty
       }
-      return allowQty;
     }
-  }
 }
 </script>
 

+ 27 - 60
src/views/supply/pickup/sum_list.vue

@@ -34,71 +34,52 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="手机号" prop="takerPhone">
-              <el-input
-                v-model.number="screenForm.takerPhone"
-                type="number"
-                placeholder="请输入手机号"
-                @mousewheel.native.prevent
-              />
+              <el-input v-model.number="screenForm.takerPhone" type="number" placeholder="请输入手机号" @mousewheel.native.prevent />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="提货人" prop="takerId">
-              <el-select v-model="screenForm.takerId" placeholder="请选择" clearable filterable>
+              <el-select
+                v-model="screenForm.takerId"
+                placeholder="请选择"
+                clearable
+                filterable
+              >
                 <el-option v-for="item in pickupManList" :key="item.id" :label="item.takerName" :value="item.id">
                   <template>
                     <span>{{ item.takerName }}</span>
                     <span style="color: #cccccc"> {{ item.customerName }}</span>
                   </template>
                 </el-option>
+
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="申请日期" prop="date">
-              <el-date-picker
-                v-model="screenForm.date"
-                type="datetimerange"
-                range-separator="至"
-                style="width: 100%"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              />
+              <el-date-picker v-model="screenForm.date" type="datetimerange" range-separator="至" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="打印时间" prop="printTime">
-              <el-date-picker
-                v-model="screenForm.printTime"
-                type="datetimerange"
-                range-separator="至"
-                style="width: 100%"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              />
+              <el-date-picker v-model="screenForm.printTime" type="datetimerange" range-separator="至" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="出库单号" prop="salesOrderId">
-              <el-input
-                v-model.number="screenForm.salesOrderId"
-                type="number"
-                placeholder="请输入出库单号"
-                @mousewheel.native.prevent
-              />
+              <el-input v-model.number="screenForm.salesOrderId" type="number" placeholder="请输入出库单号" @mousewheel.native.prevent />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="物流公司" prop="logisticsId">
-              <el-select v-model="screenForm.logisticsId" placeholder="请选择物流公司" clearable filterable>
-                <el-option
-                  v-for="item in logisticsList"
-                  :key="item.id"
-                  :label="item.logisticsCompany"
-                  :value="item.id"
-                />
+              <el-select
+                v-model="screenForm.logisticsId"
+                placeholder="请选择物流公司"
+                clearable
+                filterable
+              >
+                <el-option v-for="item in logisticsList" :key="item.id" :label="item.logisticsCompany" :value="item.id" />
+
               </el-select>
             </el-form-item>
           </el-col>
@@ -119,15 +100,7 @@
         </div>
       </div>
       <div class="table">
-        <el-table
-          v-loading="listLoading"
-          :data="dataList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="left" label="状态" min-width="80" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.printNum ? '已打单' : '未打单' }}
@@ -231,17 +204,10 @@
     </div>
     <div class="pagination clearfix">
       <div class="fr">
-        <el-pagination
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
+        <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="listTotal" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
       </div>
     </div>
+
   </div>
 </template>
 
@@ -324,7 +290,7 @@ export default {
         printEndTime: this.screenForm.printTime[1],
         salesOrderId: this.screenForm.salesOrderId
       }
-      getPickupList(params).then(res => {
+      getPickupList(params).then((res) => {
         this.dataList = res.data.records
         this.listTotal = res.data.total
         this.listLoading = false
@@ -332,7 +298,7 @@ export default {
     },
 
     getPickupManList() {
-      getPickupManList({ pageNum: 1, pageSize: -1 }).then(res => {
+      getPickupManList({ pageNum: 1, pageSize: -1 }).then((res) => {
         this.pickupManList = res.data.records
       })
     },
@@ -341,7 +307,7 @@ export default {
         pageNum: 1,
         pageSize: -1
       }
-      getLogisticsList(params).then(res => {
+      getLogisticsList(params).then((res) => {
         this.logisticsList = res.data.records
         console.log(this.logisticsList, 'kkk')
       })
@@ -375,4 +341,5 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+</style>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 428 - 232
src/views/supply/policy/components/retail_detail.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 610 - 157
src/views/supply/retail/components/retail_detail.vue


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.