浏览代码

修改bug

Qukatie 8 月之前
父节点
当前提交
ec024b612a

+ 2 - 2
src/views/businessManagement/proxyOrder/detailsPageEdit.vue

@@ -273,8 +273,8 @@
                 :disabled="selection.length < 1 || detailData.seeDisabled || !form.status || form.status < 3 || form.createFreight == 1"
                 @click="getShipmentD" v-show="goodsActives == 'goods'">生成客户收货
               </el-button> -->
-              <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()"
-                v-show="goodsActives == 'goods'">报表打印</el-button>
+              <!-- <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()"
+                v-show="goodsActives == 'goods'">报表打印</el-button> -->
               <el-button type="primary" size="small" icon="el-icon-download" @click="downloadHandle"
                 v-show="goodsActives == 'goods'">下载模板</el-button>
               <el-upload :action="baseURL" :headers="headers" :disabled="detailData.seeDisabled || browse"

+ 2 - 2
src/views/businessManagement/proxyOrder/index.vue

@@ -82,14 +82,14 @@
           <span v-if="scope.row.specialCheckStatus == 3">审批通过</span>
         </template>
         <template slot="menuLeft" slot-scope="{size}">
-          <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
+          <!-- <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
           <el-button
             type="info"
             size="small"
             icon="el-icon-download"
             @click="exportHandle"
-          >库 存</el-button>
+          >库 存</el-button> -->
         </template>
         <template slot-scope="scope" slot="menu">
           <!-- <el-button

+ 1 - 0
src/views/businessManagement/purchaseContract/configuration/customerContact.json

@@ -9,6 +9,7 @@
   "editBtn": false,
   "height": "auto",
   "delBtn": false,
+  "menu": false,
   "addRowBtn": false,
   "cellBtn": false,
   "cancelBtn": false,

+ 21 - 17
src/views/businessManagement/purchaseContract/configuration/mainList.json

@@ -13,6 +13,7 @@
   "index": true,
   "selection": true,
   "viewBtn": false,
+  "addBtn": false,
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 130,
@@ -56,57 +57,60 @@
   "column": [
     {
       "label": "订单号",
-      "prop": "brand",
-      "index": 2,
+      "prop": "orderNo",
+      "search": true,
       "overHidden": true
     },
     {
       "label": "合同日期",
-      "prop": "corpId",
+      "type": "date",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "prop": "businesDate",
       "search": true,
       "index": 3,
+      "width": 100,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
       "overHidden": true
     },
     {
       "label": "工厂",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "belongToCorpName",
+      "search": true,
       "overHidden": true
     },
     {
       "label": "销售助理",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "createUser",
+      "search": true,
       "overHidden": true
     },
     {
       "label": "业务经理",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "chargeMember",
+      "search": true,
       "overHidden": true
     },
     {
       "label": "到货地址",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "arrivalAddress",
+      "search": true,
       "overHidden": true
     },
     {
       "label": "数量",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "orderQuantity",
       "overHidden": true
     },
     {
       "label": "金额",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "orderAmount",
       "overHidden": true
     },
     {
       "label": "发货日期",
-      "prop": "requiredArrivalDate",
-      "index": 3,
+      "prop": "actualDeliveryDate",
       "overHidden": true
     }
   ]

+ 40 - 252
src/views/businessManagement/purchaseContract/detailsPageEdit.vue

@@ -7,56 +7,6 @@
           @click="backToList">返回列表
         </el-button>
       </div>
-      <div class="add-customer-btn">
-        <el-button v-if="detailData.seeDisabled" size="small" @click="editHandle" type="primary"
-          style="margin-right: 8px" :loading="saveLoading">编 辑</el-button>
-        <el-dropdown style="margin-right: 8px;">
-          <el-button type="primary" size="small" :loading="saveLoading">
-            审核处理<i class="el-icon-arrow-down el-icon--right"></i>
-          </el-button>
-          <el-dropdown-menu slot="dropdown">
-            <!-- <el-dropdown-item :disabled="browse || detailData.seeDisabled" @click.native="pleaseCheck">请核数据</el-dropdown-item> -->
-            <el-dropdown-item v-if="form.status > 0"
-              @click.native="checkScheduleDialog = true, checkId = form.id">审核进度</el-dropdown-item>
-            <!-- <el-dropdown-item v-if="form.status == 1" @click.native="repealCancel">撤销请核</el-dropdown-item>
-            <el-dropdown-item v-if="checkDisabled && form.status != 3" @click.native="changeApproveOpen">特殊审批</el-dropdown-item>
-            <el-dropdown-item v-if="form.status == 3" :disabled="detailData.seeDisabled || form.specialCheckStatus > 0" @click.native="arrearsPleaseCheck">欠款发货审批</el-dropdown-item> -->
-          </el-dropdown-menu>
-        </el-dropdown>
-        <el-dropdown style="margin-right: 8px;">
-          <el-button type="warning" size="small" :loading="saveLoading">
-            账单处理<i class="el-icon-arrow-down el-icon--right"></i>
-          </el-button>
-          <el-dropdown-menu slot="dropdown">
-            <!--            <el-dropdown-item-->
-            <!--              :disabled="detailData.seeDisabled || form.status != 3"-->
-            <!--              @click.native="applySettlement('收费')">生成账单-->
-            <!--            </el-dropdown-item>-->
-            <el-dropdown-item @click.native="openApplicationDialog" :disabled="!form.id">查看账单
-            </el-dropdown-item>
-          </el-dropdown-menu>
-        </el-dropdown>
-        <el-dropdown style="margin-right: 8px;">
-          <el-button type="success" :loading="saveLoading" size="small">
-            业务处理<i class="el-icon-arrow-down el-icon--right"></i>
-          </el-button>
-          <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="detailData.seeDisabled || form.status != 3 || form.createPurchase == 1"
-              @click.native="saveSell">生成采购
-            </el-dropdown-item>
-            <el-dropdown-item :disabled="detailData.seeDisabled || !this.form.id"
-              @click.native="copyOrder">复制单据</el-dropdown-item>
-          </el-dropdown-menu>
-        </el-dropdown>
-        <el-button class="el-button--small-yh" type="primary" :disabled="disabled || detailData.seeDisabled"
-          :loading="saveLoading" size="small" @click="editCustomer(false)">保 存
-        </el-button>
-        <div v-if="checkDisabled" style="float: right;margin-left: 8px">
-          <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openCheckDialog">
-            审批
-          </el-button>
-        </div>
-      </div>
     </div>
     <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
@@ -80,7 +30,7 @@
                 <crop-select v-else-if="item.prop === 'productionPlant'" v-model="form[item.prop]"
                   @getCorpData="getPlantRow" corpType="GYS" :disabled="detailData.seeDisabled || browse"
                   style="width: 100%"></crop-select>
-                  <el-select v-else-if="item.prop === 'brand'" v-model="form[item.prop]" placeholder="请选择" clearable
+                <el-select v-else-if="item.prop === 'brand'" v-model="form[item.prop]" placeholder="请选择" clearable
                   filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse">
                   <el-option v-for="(item, index) in brandOption" :key="index" :label="item.dictValue"
                     :value="item.dictValue"></el-option>
@@ -468,9 +418,9 @@ import {
   getProfit,
   pleaseCheck,
   repealCancel,
-  removeList
+  removeList,
+  detail
 } from "@/api/basicData/configuration"
-import { detail } from "@/api/basicData/proxyOrder"
 import { getList } from "@/api/basicData/commodityType";
 import { getCorpDetail } from "@/api/maintenance/overpayment"
 import { integralDetail } from "@/api/maintenance/integral"
@@ -1086,225 +1036,63 @@ export default {
           //   ]
           // }, 
           {
-            label: '品牌',
-            prop: 'brand',
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=brand",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
+            label: '订单号',
+            prop: 'orderNo',
+            disabled: true,
           },
           {
-            label: '业务日期',
-            prop: 'requiredArrivalDate',
-            type: 'date',
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
+            label: '合同日期',
+            prop: 'businesDate',
+            disabled: true,
           },
           {
-            label: '系统编号',
-            prop: 'orderNo',
+            label: '工厂',
+            prop: 'belongCompany',
             disabled: true,
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },
           {
-            label: '客户全称',
-            prop: 'corpId',
-            span: 8,
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'change'
-              }
-            ]
+            label: '销售助理',
+            prop: 'createUser',
+            disabled: true,
           },
           {
-            label: '到货地址',
-            prop: 'arrivalAddress',
-            span: 16,
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
+            label: '业务经理',
+            prop: 'chargeMember',
+            disabled: true,
           },
-          // {
-          //   label: '生产工厂',
-          //   prop: 'productionPlant',
-          //   span: 8,
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'change'
-          //     }
-          //   ]
-          // },
-          // {
-          //   label: '地址',
-          //   prop: 'shippingAddress',
-          //   disabled: false,
-          //   span: 16,
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'change'
-          //     }
-          //   ]
-          // }, 
-          // {
-          //   label: '销售订单号',
-          //   prop: 'orderNo',
-          //   disabled: true,
-          //   rules: [
-          //     {
-          //       required: false,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // }, {
-          //   label: '主订单号',
-          //   prop: 'morderNo',
-          //   rules: [
-          //     {
-          //       required: false,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // },
-          // {
-          //   label: '是否收取标签费',
-          //   prop: 'isLabel',
-          //   type: 'radio',
-          // },
-          // {
-          //   label: '是否包运费',
-          //   prop: 'isFreight',
-          //   type: 'radio',
-          // },
-          // {
-          //   label: '预估运费',
-          //   prop: 'predictOceanFreight',
-          //   type: 'number',
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // },
-          // {
-          //   label: '要求发货日期',
-          //   prop: 'requiredDeliveryDate',
-          //   type: 'date',
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // }, {
-          //   label: '要求到货日期',
-          //   prop: 'requiredArrivalDate',
-          //   type: 'date',
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // }, 
-          // {
-          //   label: '业务员',
-          //   prop: 'chargeMember',
-          //   rules: [
-          //     {
-          //       required: false,
-          //       message: ' ',
-          //       trigger: 'change'
-          //     }
-          //   ]
-          // }, 
-          // {
-          //   label: '联系人',
-          //   prop: 'corpAttn',
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // }, {
-          //   label: '联系电话',
-          //   prop: 'corpTel',
-          //   rules: [
-          //     {
-          //       required: true,
-          //       message: ' ',
-          //       trigger: 'blur'
-          //     }
-          //   ]
-          // },
           {
-            label: '包装要求',
-            prop: 'packageRemarks',
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'change'
-              }
-            ]
+            label: '数量',
+            prop: 'orderQuantity'
           },
           {
-            label: '总条数',
-            prop: 'sumNumber',
-            disabled: true
+            label: '金额',
+            prop: 'orderAmount'
           },
           {
-            label: "订单备注",
-            type: 'textarea',
-            span: 24,
-            prop: "orderRemark",
-            mock: {
-              type: 'county'
-            }
-          }
+            label: '到货地址',
+            prop: 'arrivalAddress',
+            disabled: true,
+            span: 16
+          },
+          {
+            label: '包装要求',
+            prop: 'packageRemarks'
+          },
+          // {
+          //   label: "订单备注",
+          //   type: 'textarea',
+          //   span: 16,
+          //   prop: "orderRemark",
+          //   mock: {
+          //     type: 'county'
+          //   }
+          // }
         ]
       },
       // 银行账号下拉
       bankList: [],
       paymentOption: [],
-      brandOption:[],
+      brandOption: [],
       statusOption: [],
       // 费用信息排序的最大值
       maxFeeNum: 0,

+ 111 - 134
src/views/businessManagement/purchaseContract/index.vue

@@ -1,69 +1,59 @@
 <template>
   <div>
-    <basic-container
-      v-show="isShow">
-      <avue-crud :option="option"
-                 :data="dataList"
-                 ref="crud"
-                 v-model="form"
-                 :page.sync="page"
-                 @row-del="rowDel"
-                 @row-update="rowUpdate"
-                 :before-open="beforeOpen"
-                 :before-close="beforeClose"
-                 :search.sync="search"
-                 @row-save="rowSave"
-                 @saveColumn="saveColumn"
-                 @search-change="searchChange"
-                 @search-reset="searchReset"
-                 @selection-change="selectionChange"
-                 @current-change="currentChange"
-                 @size-change="sizeChange"
-                 @refresh-change="refreshChange"
-                 @on-load="onLoad"
-                 @tree-load="treeLoad"
-                 :cell-style="tableRowClassName"
-                 :table-loading="loading"
-                 @expand-change="expandChange"
-                 @resetColumn="resetColumn"
-                 @search-criteria-switch="searchCriteriaSwitch"
-      >
+    <basic-container v-show="isShow">
+      <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" @row-del="rowDel"
+        @row-update="rowUpdate" :before-open="beforeOpen" :before-close="beforeClose" :search.sync="search"
+        @row-save="rowSave" @saveColumn="saveColumn" @search-change="searchChange" @search-reset="searchReset"
+        @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" :cell-style="tableRowClassName"
+        :table-loading="loading" @expand-change="expandChange" @resetColumn="resetColumn"
+        @search-criteria-switch="searchCriteriaSwitch">
         <template slot-scope="scope" slot="expand">
           <el-table :data="scope.row.insideList" v-loading="scope.row.loading" :cell-style="tableRowClassName">
-            <el-table-column  label="产品分类" prop="priceCategory" align="center" show-overflow-tooltip width="200"></el-table-column>
-            <el-table-column  label="价格类别" prop="priceType" align="center" show-overflow-tooltip width="180"></el-table-column>
-            <el-table-column  label="商品名称" prop="cname" align="center" show-overflow-tooltip width="120"></el-table-column>
-            <el-table-column  label="编码" prop="code" align="center" show-overflow-tooltip width="120"></el-table-column>
-            <el-table-column  label="规格型号" prop="typeno" align="center" show-overflow-tooltip width="120"></el-table-column>
-            <el-table-column  label="供应商" prop="corpName" align="center" show-overflow-tooltip width="120"></el-table-column>
-            <el-table-column  label="订货数量" prop="orderQuantity" align="center" show-overflow-tooltip width="180"></el-table-column>
-            <el-table-column  label="发货数量" prop="actualQuantity" align="center" show-overflow-tooltip width="200"></el-table-column>
-            <el-table-column  label="库存" prop="storageQuantity" align="center" show-overflow-tooltip width="200"></el-table-column>
-            <el-table-column  label="采购价格" prop="purchaseAmount" align="center" show-overflow-tooltip width="200"></el-table-column>
-            <el-table-column  label="最新单价" prop="price" align="center" show-overflow-tooltip width="200"></el-table-column>
-            <el-table-column  label="金额" prop="amount" align="center" show-overflow-tooltip width="200"></el-table-column>
+            <el-table-column label="产品分类" prop="priceCategory" align="center" show-overflow-tooltip
+              width="200"></el-table-column>
+            <el-table-column label="价格类别" prop="priceType" align="center" show-overflow-tooltip
+              width="180"></el-table-column>
+            <el-table-column label="商品名称" prop="cname" align="center" show-overflow-tooltip
+              width="120"></el-table-column>
+            <el-table-column label="编码" prop="code" align="center" show-overflow-tooltip width="120"></el-table-column>
+            <el-table-column label="规格型号" prop="typeno" align="center" show-overflow-tooltip
+              width="120"></el-table-column>
+            <el-table-column label="供应商" prop="corpName" align="center" show-overflow-tooltip
+              width="120"></el-table-column>
+            <el-table-column label="订货数量" prop="orderQuantity" align="center" show-overflow-tooltip
+              width="180"></el-table-column>
+            <el-table-column label="发货数量" prop="actualQuantity" align="center" show-overflow-tooltip
+              width="200"></el-table-column>
+            <el-table-column label="库存" prop="storageQuantity" align="center" show-overflow-tooltip
+              width="200"></el-table-column>
+            <el-table-column label="采购价格" prop="purchaseAmount" align="center" show-overflow-tooltip
+              width="200"></el-table-column>
+            <el-table-column label="最新单价" prop="price" align="center" show-overflow-tooltip
+              width="200"></el-table-column>
+            <el-table-column label="金额" prop="amount" align="center" show-overflow-tooltip
+              width="200"></el-table-column>
           </el-table>
         </template>
         <template slot-scope="scope" slot="orderNo">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
+            scope.row.orderNo }}</span>
         </template>
         <template slot="corpIdSearch">
-          <crop-select
-            v-model="search.corpId"
-            corpType="KH"
-          ></crop-select>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="corpId">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
+            scope.row.corpsName }}</span>
         </template>
         <template slot-scope="scope" slot="createUser">
           {{ scope.row.createUserName }}
         </template>
         <template slot-scope="scope" slot="createPurchase">
-          {{ scope.row.createPurchase == 1? '是': '否' }}
+          {{ scope.row.createPurchase == 1 ? '是' : '否' }}
         </template>
         <template slot-scope="scope" slot="createFreight">
-          {{ scope.row.createFreight == 1? '是': '否' }}
+          {{ scope.row.createFreight == 1 ? '是' : '否' }}
         </template>
         <template slot="status" slot-scope="scope">
           <span v-if="scope.row.status == 0">暂存</span>
@@ -82,14 +72,14 @@
           <span v-if="scope.row.specialCheckStatus == 3">审批通过</span>
         </template>
         <template slot="menuLeft" slot-scope="{size}">
-          <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
+          <!-- <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
           <el-button
             type="info"
             size="small"
             icon="el-icon-download"
             @click="exportHandle"
-          >库 存</el-button>
+          >库 存</el-button> -->
         </template>
         <template slot-scope="scope" slot="menu">
           <!-- <el-button
@@ -98,31 +88,21 @@
             @click="saveSell(scope.row)"
             :disabled="scope.row.status < 3 || scope.row.createPurchase == 1"
           >生成采购</el-button> -->
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            @click.stop="beforeOpenPage(scope.row,scope.index)"
-            :disabled="scope.row.status > 0"
-          >查看
+          <el-button type="text" icon="el-icon-delete" size="small"
+            @click.stop="beforeOpenPage(scope.row, scope.index)">查看
           </el-button>
         </template>
       </avue-crud>
     </basic-container>
 
-    <detail-page
-      ref="detail"
-      @goBack="goBack"
-      :detailData="detailData"
-      v-if="!isShow"
-    ></detail-page>
+    <detail-page ref="detail" @goBack="goBack" :detailData="detailData" v-if="!isShow"></detail-page>
   </div>
 </template>
 
 <script>
 import option from "./configuration/mainList.json";
-import {typeSave, saveSell,detail} from "@/api/basicData/configuration"
-import {getContractList,deleteDetails} from "@/api/basicData/proxyOrder"
+import { typeSave, saveSell, detail } from "@/api/basicData/configuration"
+import { getContractList, deleteDetails } from "@/api/basicData/proxyOrder"
 import detailPage from "./detailsPageEdit";
 import search from "../../../page/index/search";
 import { defaultDate } from "@/util/date";
@@ -149,13 +129,13 @@ export default {
       form: {},
       option: {},
       parentId: 0,
-      search:{},
+      search: {},
       dataList: [],
       page: {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,50,100,200,300]
+        pageSizes: [10, 50, 100, 200, 300]
       },
       // 非单个禁用
       single: true,
@@ -168,7 +148,7 @@ export default {
   },
   async created() {
     // this.search.businesDate = defaultDate(1)
-    this.search.createTime = defaultDate(3)
+    // this.search.createTime = defaultDate(3)
     // this.option = option
     this.option = await this.getColumnData(this.getColumnName(418), option);
     this.getWorkDicts("payment_term").then(res => {
@@ -184,7 +164,7 @@ export default {
     this.option.column.forEach(item => {
       if (item.search) i++
     })
-    if (i % 3 !== 0){
+    if (i % 3 !== 0) {
       const num = 3 - Number(i % 3)
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
@@ -225,7 +205,7 @@ export default {
     setTimeout(() => {
       if (this.$route.query.id) {
         this.isShow = true
-        this.beforeOpenPage({id: this.$route.query.id})
+        this.beforeOpenPage({ id: this.$route.query.id })
       }
       if (this.$route.query.check) {
         this.isShow = true
@@ -239,21 +219,21 @@ export default {
         this.$store.commit("DOMXS_IN_DETAIL");
       }
       if (this.$route.query.params) {
-        this.beforeOpenPage({id: this.$route.query.params})
+        this.beforeOpenPage({ id: this.$route.query.params })
       }
     }, 100)
   },
   methods: {
-    searchCriteriaSwitch(type){
-      if (type){
+    searchCriteriaSwitch(type) {
+      if (type) {
         this.option.height = this.option.height - 190
-      }else {
+      } else {
         this.option.height = this.option.height + 190
       }
       this.$refs.crud.getTableHeight()
     },
-    tableRowClassName({row, column, rowIndex, columnIndex}) {
-      if (row.orderStatus == '录入' && columnIndex == 19){
+    tableRowClassName({ row, column, rowIndex, columnIndex }) {
+      if (row.orderStatus == '录入' && columnIndex == 19) {
         return {
           background: '#eceb3c',
         }
@@ -280,7 +260,7 @@ export default {
           message: "操作成功!"
         });
         this.page.currentPage = 1;
-        this.onLoad(this.page, {parentId: 0});
+        this.onLoad(this.page, { parentId: 0 });
       });
     },
     //修改时的修改按钮点击触发
@@ -385,30 +365,30 @@ export default {
     //点击搜索按钮触发
     searchChange(params, done) {
       if (params.businesDate) {
-        params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
-        params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
+        params.contractStartDate = params.businesDate[0] + " " + "00:00:00"
+        params.contractEndDate = params.businesDate[1] + " " + "23:59:59"
         delete params.businesDate;
       }
-      if (params.requiredDeliveryDate) {
-        params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
-        params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredDeliveryDate')
-      }
-      if (params.requiredArrivalDate) {
-        params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
-        params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredArrivalDate')
-      }
-      if (params.actualDeliveryDate) {
-        params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
-        params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'actualDeliveryDate')
-      }
-      if (params.createTime) {
-        params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
-        params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
-        this.$delete(params,'createTime')
-      }
+      // if (params.requiredDeliveryDate) {
+      //   params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
+      //   params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredDeliveryDate')
+      // }
+      // if (params.requiredArrivalDate) {
+      //   params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
+      //   params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredArrivalDate')
+      // }
+      // if (params.actualDeliveryDate) {
+      //   params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
+      //   params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'actualDeliveryDate')
+      // }
+      // if (params.createTime) {
+      //   params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
+      //   params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
+      //   this.$delete(params,'createTime')
+      // }
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done()
@@ -433,7 +413,7 @@ export default {
         this.$refs.crud.toggleRowExpansion(item, false)
       })
       this.page.currentPage = 1;
-      this.onLoad(this.page,this.search);
+      this.onLoad(this.page, this.search);
     },
     // 表格展开触发
     expandChange(row, index) {
@@ -454,15 +434,15 @@ export default {
       let queryParams = Object.assign({}, data, {
         size: page.pageSize,
         current: page.currentPage,
-        billType:'XS',
+        billType: 'XS',
         corpsTypeId: this.treeDeptId
       })
       this.loading = true;
       getContractList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.dataList.forEach(item => {
-          this.$set(item,'insideList',[])
-          this.$set(item,'loading', true)
+          this.$set(item, 'insideList', [])
+          this.$set(item, 'loading', true)
         })
         this.page.total = res.data.data.total
         this.option.height = window.innerHeight - 240;
@@ -473,12 +453,12 @@ export default {
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {
       const parentId = tree.id;
-      getContractList({parentId: parentId}).then(res => {
+      getContractList({ parentId: parentId }).then(res => {
         resolve(res.data.data.records);
       });
     },
     goBack() {
-      this.detailData=this.$options.data().detailData
+      this.detailData = this.$options.data().detailData
       if (JSON.stringify(this.$route.query) != "{}") {
         this.$router.$avueRouter.closeTag();
         this.$router.push({
@@ -494,30 +474,30 @@ export default {
     gobackSearch(params) {
       params = Object.assign({}, this.search)
       if (params.businesDate && params.businesDate != '') {
-        params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
-        params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
-        this.$delete(params,'businesDate')
-      }
-      if (params.requiredDeliveryDate && params.requiredDeliveryDate != '') {
-        params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
-        params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredDeliveryDate')
-      }
-      if (params.requiredArrivalDate && params.requiredArrivalDate != '') {
-        params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
-        params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredArrivalDate')
-      }
-      if (params.actualDeliveryDate && params.actualDeliveryDate != '') {
-        params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
-        params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'actualDeliveryDate')
-      }
-      if (params.createTime && params.createTime != '') {
-        params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
-        params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
-        this.$delete(params,'createTime')
+        params.contractStartDate = params.businesDate[0] + " " + "00:00:00"
+        params.contractEndDate = params.businesDate[1] + " " + "23:59:59"
+        this.$delete(params, 'businesDate')
       }
+      // if (params.requiredDeliveryDate && params.requiredDeliveryDate != '') {
+      //   params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
+      //   params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredDeliveryDate')
+      // }
+      // if (params.requiredArrivalDate && params.requiredArrivalDate != '') {
+      //   params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
+      //   params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredArrivalDate')
+      // }
+      // if (params.actualDeliveryDate && params.actualDeliveryDate != '') {
+      //   params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
+      //   params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'actualDeliveryDate')
+      // }
+      // if (params.createTime && params.createTime != '') {
+      //   params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
+      //   params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
+      //   this.$delete(params,'createTime')
+      // }
       return params
     },
     //列保存触发
@@ -543,7 +523,7 @@ export default {
     },
     async resetColumn() {
       this.option = option;
-      const inSave = await this.delColumnData(this.getColumnName(418),option);
+      const inSave = await this.delColumnData(this.getColumnName(418), option);
       if (inSave) {
         this.$nextTick(() => {
           this.$refs.crud.doLayout()
@@ -561,8 +541,7 @@ export default {
         type: 'warning'
       }).then(() => {
         window.open(
-          `/api/blade-client/goodsdesc/export-out-info?${
-            this.website.tokenHeader
+          `/api/blade-client/goodsdesc/export-out-info?${this.website.tokenHeader
           }=${getToken()}`
         );
       }).catch(() => {
@@ -592,6 +571,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 73 - 54
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -205,9 +205,9 @@
         <containerTitle title="商品信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <avue-crud :option="customerContact" v-model="contactsForm" :data="goodsShowData" ref="crudContact"
-            @row-save="rowSave" @row-update="rowUpdate" @selection-change="productSelection"
-            @row-del="rowDel" @saveColumn="saveColumn('goods')" @resetColumn="resetColumn"
-            :summary-method="summaryMethod" :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
+            @row-save="rowSave" @row-update="rowUpdate" @selection-change="productSelection" @row-del="rowDel"
+            @saveColumn="saveColumn('goods')" @resetColumn="resetColumn" :summary-method="summaryMethod"
+            :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
             <template slot="headerSerial">
               <span class="order_number">序号</span>
               <el-button class="number_button" type="primary" icon="el-icon-circle-plus-outline" circle size="mini"
@@ -342,7 +342,7 @@
               <el-button type="danger" icon="el-icon-delete" size="small" @click="removeList"
                 :disabled="(selection.length == 0) || detailData.seeDisabled || browse">删除
               </el-button>
-              <el-button  type="primary" icon="el-icon-plus" size="small" @click="DLSelection"
+              <el-button type="primary" icon="el-icon-plus" size="small" @click="DLSelection"
                 :disabled="detailData.seeDisabled || !form.corpId || browse">
                 代理订单
               </el-button>
@@ -408,35 +408,36 @@
       </span>
     </el-dialog>
     <el-dialog title="代理订单" append-to-body class="el-dialogDeep" :visible.sync="dialogVisibleDL" width="80%"
-      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeDL">
-      <el-row :style="{ height: rowHeight }">
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @closed="closeDL">
+      <el-row :style="{ height: rowHeight }" v-loading="loadingPolicy">
         <el-col :span="10" style="height: 100%;overflow-y: auto">
           <div>
             <avue-crud :data="dataDL" :option="optionDL" @row-click="handleRowClick"></avue-crud>
           </div>
         </el-col>
         <el-col :span="14">
-          <basic-container>
-            <avue-crud :option="optionThree" :table-loading="loading" :data="DLListShow" ref="crud"
-              @refresh-change="refreshChangeDL" @selection-change="selectionChangeDL" @search-change="DLSearch"
-              :page.sync="page">
-              <template slot="menuLeft">
-                <el-tabs v-model="activeName" @tab-click="tabHandleDL">
-                  <el-tab-pane label="查询结果" name="searchList" />
-                  <el-tab-pane label="已选定数据" name="importStaging" />
-                </el-tabs>
-              </template>
-              <template slot="orderQuantity" slot-scope="{row}">
-                <el-input-number v-model="row.orderQuantity" size="small" :controls="false"
-                  @input="amountChange(row)" style="width: 100%" />
-              </template>
-              <template slot-scope="scope" slot="menu">
-                <el-button type="text" icon="el-icon-edit" size="small"
-                  @click.stop="importStagList(scope.row, scope.index, 'DL')" v-if="activeName == 'searchList'"
-                  :disabled="DLListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="采购计划" name="searchList" />
+            <el-tab-pane label="已选定数据" name="importStaging" />
+          </el-tabs>
+          <basic-container v-if="activeName == 'searchList'">
+            <avue-crud :option="optionThree" :table-loading="loading" :data="DLListShow" ref="crud">
+              <template slot-scope="{row,index}" slot="menu">
+                <el-button type="text" icon="el-icon-edit" size="small" @click.stop="importStagListDL(row, index)"
+                  v-if="activeName == 'searchList'"
+                  :disabled="DLListSave.findIndex(item => item.id == row.id) !== -1">选择
                 </el-button>
-                <el-button type="text" icon="el-icon-delete" size="small"
-                  @click.stop="removeStagList(scope.row, scope.index, 'DL')" v-else>移除
+              </template>
+            </avue-crud>
+          </basic-container>
+          <basic-container v-if="activeName == 'importStaging'">
+            <dic-select v-model="policyType" placeholder="政策类型" key="id" label="title" keyValue="id"
+              :url="'/blade-mocha-item/salespolicy/lazy-tree?newTime=' + nowDate + '&parentId=0&corps=' + form.corpId"
+              :filterable="true" :remote="true"></dic-select>
+            <avue-crud :option="optionThree" :table-loading="loading" :data="DLListSave" ref="crud"
+              @selection-change="selectionChangeDL">
+              <template slot-scope="{row,index}" slot="menu">
+                <el-button type="text" icon="el-icon-delete" size="small" @click.stop="removeStagListDL(row, index)">移除
                 </el-button>
               </template>
             </avue-crud>
@@ -642,7 +643,7 @@ import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
 import { mapGetters } from "vuex";
 import { customerList as storageType } from "@/api/basicData/basicStorageType"
-
+import dicSelect from "@/components/dicSelect/main";
 export default {
   name: "detailsPage",
   props: {
@@ -662,13 +663,20 @@ export default {
     financialAccount,
     check,
     checkSchedule,
+    dicSelect
   },
   data() {
     return {
+      policyType: null,
       dataDL: [],
       optionThree: {
         header: false,
-        menu:false,
+        menu: true,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: '80',
+        // selection: true,
+        // tip: false,
         column: [
           {
             label: '商品名称',
@@ -695,7 +703,7 @@ export default {
       },
       optionDL: {
         header: false,
-        menu:false,
+        menu: false,
         column: [
           {
             label: '订单号',
@@ -801,6 +809,7 @@ export default {
       optionTwo: commodity,
       optionTwoCost: optionTwoCost,
       customerBuyFree: BuyFree,
+      nowDate: new Date().toLocaleString('chinese', { hour12: false }).replaceAll('/', '-'),
       policyOption: {
         nodeKey: 'id',
         lazy: true,
@@ -2529,17 +2538,7 @@ export default {
         }
       }
     },
-    async importDL() {
-      this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
-      if (this.DLListSave.length > 0) {
-        this.DLListSaveHandle()
-      } else {
-        if (this.tableData.length > 0) {
-          this.tableDataHandle()
-        }
-      }
-    },
-    DLListSaveHandle() {
+    getImportDL() {
       this.saveLoading = true;
       for (let item in this.DLListSave) {
         getMarketPrice({
@@ -2624,12 +2623,35 @@ export default {
               this.quantityChange(this.DLListSave[item])
             })
           })
-          // this.$refs.crudContact.rowCell(this.DLListSave[item], this.DLListSave.length - 1)
         })
       }
       this.saveLoading = false;
       this.dialogVisibleDL = false
     },
+    importDL() {
+      if(this.DLListSave.length==0){
+        return this.$message.error('请选择采购计划明细')
+      }
+      if (this.policyType) {
+        this.loadingPolicy = true
+        detailList(this.policyType).then(res => {
+          if (res.data.data.specialItemList) {
+            res.data.data.specialItemList.forEach(item => {
+              this.DLListSave.forEach(e => {
+                if (item.code == e.code){
+                  this.$set(e, 'price', item.salesPrice);
+                }
+              })
+            })
+          }
+        }).finally(() => {
+          this.loadingPolicy = false;
+        })
+      } else {
+        this.getImportDL()
+      }
+
+    },
     goodsListSaveHandle() {
       this.saveLoading = true;
       for (let item in this.goodsListSave) {
@@ -2816,8 +2838,8 @@ export default {
       this.activeName = "searchList";
     },
     closeDL() {
-      this.treeDataDL = [];
-      this.treeDeptId = "";
+      this.DLListShow = [];
+      this.DLListSave = [];
       this.activeName = "searchList";
     },
     closeFees() {
@@ -2837,7 +2859,7 @@ export default {
       this.tableData = list
     },
     //选中触发
-    selectionChangeDl(list) {
+    selectionChangeDL(list) {
       this.tableData = list
     },
     //费用选中触发
@@ -3294,7 +3316,7 @@ export default {
     //商品列表查询
     onLoadDL(row) {
       this.loading = true;
-      getAgencyOrderItem({id:row.id}).then(res => {
+      getAgencyOrderItem({ id: row.id }).then(res => {
         this.DLListShow = res.data.data;
         this.loading = false;
       });
@@ -3819,15 +3841,6 @@ export default {
       }
       return sums;
     },
-    tabHandleDL(data) {
-      if (data.name == 'searchList') {
-        this.DLListShow = this.data;
-        this.page.total = this.pageList.total
-      } else if (data.name == 'importStaging') {
-        this.DLListShow = this.DLListSave;
-        this.page.total = 0
-      }
-    },
     // 标签页切换
     tabHandle(data) {
       if (data.name == 'searchList') {
@@ -3869,6 +3882,12 @@ export default {
         this.goodsListSave.splice(row.$index, 1)
       }
     },
+    removeStagListDL(row, index, type) {
+      this.DLListSave.splice(row.$index, 1)
+    },
+    importStagListDL(row, index) {
+      this.DLListSave.push(row)
+    },
     importStagList(row, index, type) {
       if (type === 'policy') {
         this.goodsListPolicy.push(row);

+ 3 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue

@@ -678,6 +678,9 @@ export default {
         },
         // 一键删除
         handleDelete() {
+            for(let item of  this.assemblyForm.containersList){
+                if(item.quantity>0) return this.$message.error('箱型:'+item.cntrTypeCode+'件数大于0不允许删除')
+            }
             this.$confirm("确定将全部数据删除?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",

+ 10 - 5
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -14,7 +14,10 @@
                 <el-button type="info" plain size="small" :disabled="seeDisabled" @click="onclickEdit">一键编辑
                 </el-button>
                 <el-button type="success" size="small" plain :disabled="seeDisabled"
-                    @click.stop="equalDistribution">一键配箱
+                    @click.stop="equalDistribution(1)">按TEU配箱
+                </el-button>
+                <el-button type="success" size="small" plain :disabled="seeDisabled"
+                    @click.stop="equalDistribution(2)">按箱量配箱
                 </el-button>
             </template>
             <template slot-scope="scope" slot="menu">
@@ -366,7 +369,7 @@ export default {
             })
         },
         // 平均箱量
-        equalDistribution() {
+        equalDistribution(type) {
             if (!this.assemblyForm.id) {
                 this.$message({
                     message: '请先点击右上角保存按钮,保存数据之后才能添加!',
@@ -393,13 +396,14 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
             }).then(() => {
-                this.containersEqualDistributionfun()
+                this.containersEqualDistributionfun(type)
             })
         },
         // 平均分配接口
-        containersEqualDistributionfun() {
+        containersEqualDistributionfun(type) {
             containersEqualDistribution({
                 pid: this.assemblyForm.id,
+                type:type,
                 waitingBox: this.assemblyForm.waitingBoxList[0]
             }).then(res => {
                 if (res.data.data instanceof Array) {
@@ -413,7 +417,8 @@ export default {
                     this.$message({
                         type: 'warning',
                         dangerouslyUseHTMLString: true,
-                        message: '<table border="1">\n' +
+                        message: '<span style="color:red">注意!!!件数不能平均分 ,请手工配箱,或者修改件数.</span>\n'+
+                        '<table border="1">\n' +
                             '  <thead>\n' +
                             '    <tr>\n' +
                             '      <th></th>\n' +

+ 5 - 5
src/views/tirePartsMall/purchaseService/outStorage/index.vue

@@ -142,11 +142,11 @@ export default {
             disabled: true,
             width: 200,
             overHidden: true,
-            props: {
-              label: 'cname',
-              value: 'cname'
-            },
-            dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+            // props: {
+            //   label: 'cname',
+            //   value: 'cname'
+            // },
+            // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
           }, {
             label: '商品编码',
             disabled: true,

+ 14 - 9
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -84,17 +84,17 @@ export default {
         column: [
           {
             label: '商品名称',
-            prop: 'goodsId',
+            prop: 'goodsName',
             width: 200,
             overHidden: true,
-            disabled: false,
-            filterable: true,
-            type: 'select',
-            props: {
-              label: 'cname',
-              value: 'id'
-            },
-            dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+            // disabled: false,
+            // filterable: true,
+            // type: 'select',
+            // props: {
+            //   label: 'cname',
+            //   value: 'id'
+            // },
+            // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
           },
           {
             label: "实际数量",
@@ -470,6 +470,11 @@ export default {
 
         //   });
         // }
+        if (res.data.data.records) {
+          res.data.data.records.forEach(e => {
+            e.itemLoading = true;
+          });
+        }
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
         this.$nextTick(() => {

+ 6 - 6
src/views/tirePartsMall/salesManagement/outboundWorkOrder/index.vue

@@ -138,15 +138,15 @@ export default {
         column: [
           {
             label: '商品名称',
-            prop: 'goodsId',
+            prop: 'goodsName',
             disabled: true,
             width: 200,
             overHidden: true,
-            props: {
-              label: 'cname',
-              value: 'id'
-            },
-            dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+            // props: {
+            //   label: 'cname',
+            //   value: 'id'
+            // },
+            // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
           }, {
             label: '商品编码',
             disabled: true,

+ 7 - 7
src/views/tirePartsMall/salesService/inStorage/index.vue

@@ -88,13 +88,13 @@ export default {
             width: 200,
             overHidden: true,
             disabled: false,
-            filterable: true,
-            type: 'select',
-            props: {
-              label: 'cname',
-              value: 'cname'
-            },
-            dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+            // filterable: true,
+            // type: 'select',
+            // props: {
+            //   label: 'cname',
+            //   value: 'cname'
+            // },
+            // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
           },
           {
             label: "退货数量",