Browse Source

福达bug 2023-12-2

caojunjie 2 years ago
parent
commit
8acb910a30

+ 6 - 0
src/enums/column-name.js

@@ -11,6 +11,9 @@ const columnName = [{
   code: 2.1,
   name: '出口采购订单-导入销售单'
 }, {
+  code: 2.2,
+  name: '出口采购订单-明细'
+}, {
   code: 3,
   name: '出口采购订单商品信息'
 }, {
@@ -1205,6 +1208,9 @@ const columnName = [{
   code: 274.4,
   name: '轮胎商城-采购管理-采购订单列表'
 },{
+  code: 274.5,
+  name: '轮胎商城-采购管理-盘点列表'
+},{
   code: 276,
   name: '轮胎商城-采购管理-入库任务-列表'
 },

+ 17 - 2
src/views/basicData/customerManagement/companyMaterial/configuration/bankOfDeposit.json

@@ -68,9 +68,24 @@
         }
       ]
     },{
+      "label": "地址",
+      "prop": "address",
+      "index": 5,
+      "width":100
+    },{
+      "label": "Swift Code",
+      "prop": "swiftCode",
+      "index": 6,
+      "width":100
+    },{
+      "label": "CNAPS",
+      "prop": "cnaps",
+      "index": 7,
+      "width":100
+    },{
       "label": "备注",
       "prop": "remarks",
-      "index": 5,
+      "index": 8,
       "width":100,
       "rules": [
         {
@@ -82,7 +97,7 @@
     },{
       "label": "科目编码",
       "prop": "subjectNumber",
-      "index": 5,
+      "index": 8,
       "width":100,
       "rules": [
         {

+ 30 - 19
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -29,6 +29,7 @@
       "label": "详情信息",
       "prop": "clientMessage",
       "index": 2,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true
     },
@@ -36,7 +37,7 @@
       "label": "报价日期",
       "prop": "businesDate",
       "search": true,
-      "index": 3,
+      "index": 1.2,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8,
@@ -47,7 +48,7 @@
       "label": "订单号",
       "prop": "orderNo",
       "search": true,
-      "index": 4,
+      "index": 1.3,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8
@@ -57,6 +58,7 @@
       "prop": "dateValidity",
       "search": true,
       "index": 5,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8,
@@ -66,7 +68,7 @@
     {
       "label": "价格条款",
       "prop": "priceTerms",
-      "index": 6,
+      "index": 1.4,
       "minWidth": 80,
       "overHidden": true
     },
@@ -74,6 +76,7 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 7,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true
     },
@@ -81,20 +84,21 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 8,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "箱型",
       "prop": "boxPile",
-      "index": 9,
+      "index": 1.5,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "箱量",
       "prop": "boxNumber",
-      "index": 10,
+      "index": 1.6,
       "minWidth": 80,
       "overHidden": true
     },
@@ -103,6 +107,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 11,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true,
       "type": "select",
@@ -116,8 +121,8 @@
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
-      "index": 12,
-      "minWidth": 80,
+      "index": 1.7,
+      "minWidth": 140,
       "overHidden": true,
       "searchSpan": 8
     },
@@ -125,8 +130,8 @@
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
-      "index": 13,
-      "minWidth": 80,
+      "index": 1.8,
+      "minWidth": 140,
       "overHidden": true,
       "type": "select",
       "filterable": true,
@@ -140,7 +145,7 @@
     {
       "label": "数量合计",
       "prop": "orderQuantity",
-      "index": 14,
+      "index": 1.9,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -148,24 +153,24 @@
     {
       "label": "产品毛利",
       "prop": "grossProfit",
-      "index": 15,
-      "minWidth": 80,
+      "index": 2,
+      "minWidth": 110,
       "align": "right",
       "overHidden": true
     },
     {
       "label": "产品利率",
       "prop": "grossProfitRate",
-      "index": 16,
-      "minWidth": 80,
+      "index": 2.1,
+      "minWidth": 70,
       "align": "right",
       "overHidden": true
     },
     {
       "label": "销售金额",
       "prop": "amount",
-      "index": 17,
-      "minWidth": 80,
+      "index": 2.2,
+      "minWidth": 110,
       "align": "right",
       "overHidden": true
     },
@@ -173,6 +178,7 @@
       "label": "采购金额",
       "prop": "purchaseAmount",
       "index": 18,
+      "hide": true,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -193,6 +199,7 @@
       "prop": "sysNo",
       "search": true,
       "index": 20,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8
@@ -200,7 +207,7 @@
     {
       "label": "制单人",
       "prop": "createUser",
-      "index": 21,
+      "index": 2.3,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -217,6 +224,7 @@
       "label": "制单日期",
       "prop": "createTime",
       "index": 22,
+      "hide": true,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -228,13 +236,14 @@
       "label": "船务状态",
       "prop": "ifShipping",
       "index": 23,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "orderRemark",
-      "index": 24,
+      "index": 2.4,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -244,6 +253,7 @@
       "label": "采购备注",
       "prop": "purchaseRemark",
       "index": 25,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true
     },
@@ -251,8 +261,9 @@
       "label": "销售备注",
       "prop": "shippingRemark",
       "index": 26,
+      "hide": true,
       "minWidth": 80,
       "overHidden": true
     }
   ]
-}
+}

+ 33 - 0
src/views/exportTrade/invoice/config/mainList.json

@@ -65,6 +65,10 @@
       "prop": "plannedDeliveryDate",
       "overHidden": true
     },{
+      "label": "工作号",
+      "prop": "jobNumber",
+      "overHidden": true
+    },{
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
@@ -157,6 +161,35 @@
       "prop": "shippingDate",
       "overHidden": true
     },{
+      "label": "需产地证",
+      "prop": "certificateOriginRequired",
+      "type": "select",
+      "dicData": [{
+        "label": "是",
+        "value": "1"
+      },{
+        "label": "否",
+        "value": "0"
+      }]
+    },{
+      "label": "签单方式",
+      "prop": "signingMethod",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=signing_method",
+      "props": {
+        "label": "dictValue",
+        "value": "dictValue"
+      }
+    },{
+      "label": "三方检验",
+      "prop": "tripartiteInspection",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=tripartite_inspection",
+      "props": {
+        "label": "dictValue",
+        "value": "dictValue"
+      }
+    },{
       "label": "备注",
       "prop": "deliveryRemarks",
       "search": true,

+ 4 - 0
src/views/exportTrade/invoice/detailsPage.vue

@@ -531,6 +531,10 @@ export default {
             prop: "voyage",
             span: 8,
           },{
+            label: "工作号",
+            prop: "jobNumber",
+            span: 8,
+          },{
             label: "采购备注",
             prop: "purchaseRemark",
             type: "textarea",

+ 19 - 18
src/views/exportTrade/purchaseContract/config/customerContact.json

@@ -17,21 +17,21 @@
     {
       "label": "采购单号",
       "prop": "billNo",
-      "index": 1,
+      "index": 2,
       "width": 100,
       "overHidden": true
     },{
       "label": "预交日期",
       "prop": "plannedDeliveryDate",
-      "index": 1.1,
-      "width": 100,
+      "index": 1,
+      "width": 120,
       "overHidden": true
     },
     {
       "label": "产品类别",
       "prop": "priceCategory",
-      "index": 1.2,
-      "width": 100,
+      "index": 1.1,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -44,15 +44,15 @@
     {
       "label": "产品名称",
       "prop": "cname",
-      "index": 3,
-      "width": 100,
+      "index": 1.2,
+      "width": 200,
       "overHidden": true
     },{
       "label": "英文名称",
       "prop": "ename",
       "overHidden": true,
-      "index": 3,
-      "width": 180
+      "index": 1.3,
+      "width": 150
     },
     {
       "label": "产品属性",
@@ -88,21 +88,22 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "数量",
       "prop": "orderQuantity",
-      "index": 8,
-      "width": 100,
+      "index": 1.4,
+      "width": 70,
       "align": "right",
       "overHidden": true
     },
     {
       "label": "采购数量",
       "prop": "actualQuantity",
-      "index": 9,
-      "width": 120,
+      "index": 1.5,
+      "width": 70,
       "align": "right",
       "overHidden": true
     },
@@ -148,16 +149,16 @@
     {
       "label": "单价",
       "prop": "displayPrice",
-      "index": 13,
-      "width": 100,
+      "index": 1.6,
+      "width": 80,
       "align": "right",
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 14,
-      "width": 100,
+      "index": 1.7,
+      "width": 80,
       "align": "right",
       "overHidden": true
     },{

+ 13 - 13
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -22,7 +22,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 1,
-      "minWidth": 80,
+      "minWidth": 120,
       "overHidden": true
     },
     {
@@ -31,7 +31,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 3.1,
-      "minWidth": 100,
+      "minWidth": 120,
       "overHidden": true
     },
     {
@@ -40,7 +40,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 2,
-      "minWidth": 80,
+      "minWidth": 90,
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd"
@@ -51,7 +51,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 3,
-      "minWidth": 100,
+      "minWidth": 120,
       "overHidden": true
     },
     {
@@ -60,7 +60,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 4,
-      "minWidth": 80,
+      "minWidth": 90,
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd"
@@ -69,7 +69,7 @@
       "prop": "requiredDeliveryDate",
       "search": true,
       "searchSpan": 8,
-      "index": 5,
+      "index": 10,
       "minWidth": 80,
       "overHidden": true,
       "type": "date",
@@ -78,7 +78,7 @@
     {
       "label": "付款方式",
       "prop": "paymentType",
-      "index": 6,
+      "index": 10,
       "minWidth": 80,
       "search": true,
       "searchSpan": 8,
@@ -92,15 +92,15 @@
     {
       "label": "采购金额",
       "prop": "purchaseAmount",
-      "index": 7,
-      "minWidth": 80,
+      "index": 5,
+      "minWidth": 90,
       "align": "right",
       "overHidden": true
     },
     {
       "label": "数量合计",
       "prop": "orderQuantity",
-      "index": 8,
+      "index": 6,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -163,7 +163,7 @@
     {
       "label": "采购状态",
       "prop": "fudaPurchaseStatus",
-      "index": 8.53,
+      "index": 7,
       "minWidth": 80,
       "overHidden": true
     },
@@ -257,8 +257,8 @@
     {
       "label": "备注",
       "prop": "orderRemark",
-      "index": 14,
-      "minWidth": 80,
+      "index": 8,
+      "minWidth": 150,
       "overHidden": true,
       "search": true,
       "searchSpan": 8

+ 308 - 3
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -125,6 +125,8 @@
                 <!--|| !form.estimateGoodGoods 之前判断货备齐的是否禁用-->
               <el-button type="success" size="small" :disabled="!form.id || form.orderStatus == '待采购'"
                 @click.native="dialog = true; fudaSatus = 3">货备齐</el-button>
+
+              <el-button type="warning" size="small" @click="buyingtaskfun">采购任务</el-button>
               <!--              <el-button-->
               <!--                type="warning"-->
               <!--                icon="el-icon-plus"-->
@@ -219,6 +221,49 @@
     </el-dialog>
     <report-dialog :switchDialog="switchDialogs" :reportId="form.srcIds" reportName="出口贸易-采购"
                    @onClose="onCloses()"></report-dialog>
+
+
+      <el-dialog title="导入采购任务" v-if="ProcurementVisible" :visible.sync="ProcurementVisible" append-to-body
+                 :close-on-click-modal="false" :close-on-press-escape="false" :before-close="function () {
+                ProcurementVisible = false; buyingtaskParams = {}
+            }" top="1vh" width="90%">
+            <span>
+                 <avue-crud :data="dialogData" :option="dialogOption" :search.sync="buyingtaskParams" ref="dialogCrud"
+                            @resetColumn="resetColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
+                            @saveColumn="saveColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
+                            @refresh-change="refreshChangeTwo" @search-change="searchChangeTwo" @search-reset="searchReset"
+                            @on-load="dialogOnLoad">
+                            <template slot="menuLeft">
+                                <el-tabs v-model="buyingtaskActiveName" @tab-click="tabHandle">
+                                    <el-tab-pane label="查询结果" name="searchList" />
+                                    <el-tab-pane label="已选定数据" name="importStaging" />
+                                </el-tabs>
+                            </template>
+                            <template slot="corpNameSearch">
+                                <crop-select v-model="buyingtaskParams.corpId" corpType="GYS" />
+                            </template>
+                            <template slot="actualQuantity" slot-scope="scope">
+                                <el-input-number v-if="buyingtaskActiveName === 'importStaging'" v-model="scope.row.actualQuantity"
+                                                 :precision="2" :min="0.01" :controls="false"></el-input-number>
+                                <span v-else>{{ scope.row.actualQuantity }}</span>
+                            </template>
+                            <template slot-scope="scope" slot="menu">
+                                <el-button type="text" icon="el-icon-edit" size="small"
+                                           @click.stop="importStagList(scope.row, scope.index)" v-if="buyingtaskActiveName == 'searchList'"
+                                           :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                                </el-button>
+                                <el-button type="text" icon="el-icon-delete" size="small"
+                                           @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                                </el-button>
+                            </template>
+                        </avue-crud>
+            </span>
+          <span slot="footer" class="dialog-footer">
+                <el-button type="warning" @click="openReport">导出</el-button>
+                <el-button @click="ProcurementVisible = false; buyingtaskParams = {}">取 消</el-button>
+                <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
+            </span>
+      </el-dialog>
   </div>
 </template>
 
@@ -234,7 +279,7 @@ import {
     getDeptLazyTree,
     getGoods,
     getSpecification,
-    pleaseCheck, purchaseStatusUpdate, cancelPurchaseStatus, orderExport
+    pleaseCheck, purchaseStatusUpdate, cancelPurchaseStatus, orderExport, listXS, listBYStatus, generatePurchaseBill
 } from "@/api/exportTrade/purchaseContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
@@ -263,6 +308,142 @@ export default {
   },
   data() {
     return {
+      ProcurementVisible:false, // 采购任务弹窗
+      buyingtaskParams:{}, // 采购任务弹窗
+      dialogData:[], // 采购任务弹窗右侧数据
+      goodsListShow:[], // 采购任务已选中的数据
+      dialogOption: {}, // 采购任务弹窗右侧配置
+      dialogOptionList: {
+            searchShow: true,
+            searchMenuSpan: 8,
+            border: true,
+            index: true,
+            viewBtn: false,
+            editBtn: false,
+            delBtn: false,
+            addBtn: false,
+            menuWidth: "100",
+            headerAlign: "center",
+            searchIcon: false,
+            searchIndex: 2,
+            tip: false,
+            column: [{
+                label: "销售单号",
+                prop: "billNo",
+                search: true,
+                searchSpan: 8,
+                searchOrder: 1,
+                overHidden: true
+            }, {
+                label: "销售日期",
+                prop: "businesDate",
+                searchProp: "businesDateList",
+                width: 100,
+                type: "date",
+                searchSpan: 8,
+                searchRange: true,
+                search: true,
+                searchDefaultTime: ["00:00:00", "23:59:59"],
+                format: "yyyy-MM-dd",
+                valueFormat: "yyyy-MM-dd HH:mm:ss",
+                overHidden: true
+            }, {
+                label: "供应商",
+                prop: "corpName",
+                searchSpan: 8,
+                search: true,
+                overHidden: true
+            }, {
+                label: "交货日期",
+                prop: "plannedDeliveryDate",
+                searchProp: "plannedDeliveryDateList",
+                width: 100,
+                type: "date",
+                searchSpan: 8,
+                searchRange: true,
+                search: true,
+                searchDefaultTime: ["00:00:00", "23:59:59"],
+                format: "yyyy-MM-dd",
+                valueFormat: "yyyy-MM-dd HH:mm:ss",
+                overHidden: true
+            }, {
+                label: "采购员",
+                prop: "carry",
+                overHidden: true
+            }, {
+                label: "产品名称",
+                prop: "cname",
+                overHidden: true
+            }, {
+                label: "产品编号",
+                prop: "code",
+                overHidden: true
+            }, {
+                label: "产品类别",
+                prop: "priceCategory",
+                overHidden: true
+            }, {
+                label: "产品型号",
+                prop: "itemType",
+                overHidden: true
+            }, {
+                label: "数量",
+                prop: "orderQuantity"
+            }, {
+                label: "已采购数",
+                prop: "purchaseQuantity",
+                overHidden: true
+            }, {
+                label: "待采数",
+                prop: "actualQuantity",
+                overHidden: true
+            }, {
+                label: "螺纹",
+                prop: "remarksOne",
+                overHidden: true
+            }, {
+                label: "介质",
+                prop: "customTwo",
+                overHidden: true
+            }, {
+                label: "颜色",
+                prop: "customThree",
+                overHidden: true
+            }, {
+                label: "电压",
+                prop: "customFour",
+                overHidden: true
+            }, {
+                label: "显示全部",
+                prop: "showAll",
+                searchSpan: 8,
+                searchOrder: 2,
+                overHidden: true,
+                type: "select",
+                clearable: false,
+                search: true,
+                hide: true,
+                showColumn: false,
+                dicData: [{
+                    label: '需采购',
+                    value: 0
+                }, {
+                    label: '已采购',
+                    value: 1
+                }],
+                searchValue: 0
+            }]
+        },
+      // 采购任务弹窗右侧分页配置
+      dialogPage: {
+          pageSize: 20,
+          currentPage: 1,
+          total: 0,
+          pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      buyingtaskActiveName:'searchList', // 采购任务弹窗tabs切换
+      goodsListSave:[], // 采购任务已选择数据
+
       pickerValue: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
       dialog: false,
       fudaSatus: 0,
@@ -344,7 +525,14 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00"
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            rules: [
+                {
+                    required: true,
+                    message: "",
+                    trigger: "blur"
+                }
+            ]
           },
           {
             label: "实交日期",
@@ -596,6 +784,47 @@ export default {
     }
   },
   methods: {
+      // 采购任务弹窗点击
+      async buyingtaskfun(){
+          this.dialogOption = await this.getColumnData(this.getColumnName(2.1), this.dialogOptionList);
+          this.goodsListShow = []
+          this.goodsListSave = []
+          this.totalTwo = 0
+          this.dialogData = []
+          this.buyingtaskParams.pid = this.form.srcIds
+          this.dialogPage.currentPage = 1;
+          this.dialogOnLoad(this.dialogPage);
+          this.ProcurementVisible = true
+      },
+      // 采购任务弹窗导入
+      confirmImport() {
+          let ids = this.goodsListSave.map(item => {
+              return item.id
+          })
+          const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+          });
+          generatePurchaseBill(this.goodsListSave).then(res => {
+              this.$message.success("导入成功")
+              for(let item of  res.data.data.orderItemsList) {
+                  getGoods(1,10,null,{cname:item.cname}).then(res=>{
+                      item.price = res.data.data.records[0].displayPrice
+                  })
+              }
+              this.data = [...this.data,...res.data.data.orderItemsList]
+              loading.close()
+              this.ProcurementVisible = false
+              this.buyingtaskActiveName = "searchList"
+              // setTimeout(() => {
+              //     this.show = false;
+              // }, 200);
+          }).catch(() => {
+              loading.close()
+          })
+      },
       // 导出订单
       exportOrderfun(){
           const routeData = this.$router.resolve({
@@ -1285,7 +1514,83 @@ export default {
           this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
         }, 1000);
       }
-    }
+    },
+      // 采购任务tabs切换
+      tabHandle(data) {
+          if (data.name == 'searchList') {
+              this.dialogData = this.goodsListShow;
+              this.dialogPage.total = this.totalTwo
+          } else if (data.name == 'importStaging') {
+              this.goodsListShow = this.dialogData;
+              this.dialogData = this.goodsListSave;
+              this.totalTwo = this.dialogPage.total
+              this.dialogPage.total = 0
+          }
+      },
+      // 选择
+      importStagList(row, index) {
+          this.goodsListSave.push(row);
+      },
+      // 采购任务弹窗移除
+      removeStagList(row, index) {
+          this.goodsListSave.splice(row.$index, 1);
+      },
+      refreshChangeTwo() {
+          this.dialogOnLoad(this.dialogPage);
+      },
+      searchChangeTwo(params, done) {
+          done()
+          if (!this.buyingtaskParams.pid && !this.buyingtaskParams.billNo) {
+              return this.$message.error("请选择左边单号或输入销售单号")
+          } else {
+              this.dialogOnLoad(this.dialogPage);
+          }
+      },
+      searchReset() {
+          this.buyingtaskParams.showAll = 0
+          this.$refs.singleTable.setCurrentRow([]);
+          this.dialogData = []
+      },
+      // 采购列表获取列表数据
+      dialogOnLoad(page, params) {
+          params = {
+              ...params,
+              size: page.pageSize,
+              current: page.currentPage,
+              ...this.buyingtaskParams
+          }
+          if (this.buyingtaskParams.pid || this.buyingtaskParams.billNo) {
+              listXS(params).then(res => {
+                  this.dialogData = res.data.data
+                  // this.dialogPage.total = res.data.data.total
+              })
+          }
+      },
+      //自定义列保存
+      async saveColumnTwo(ref, option, optionBack, code) {
+          /**
+           * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+           * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+           * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+           */
+          const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+          if (inSave) {
+              this.$message.success("保存成功");
+              //关闭窗口
+              this.$refs[ref].$refs.dialogColumn.columnBox = false;
+          }
+      },
+      //自定义列重置
+      async resetColumnTwo(ref, option, optionBack, code) {
+          this[option] = this[optionBack];
+          const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+          if (inSave) {
+              this.$message.success("重置成功");
+              this.$refs[ref].$refs.dialogColumn.columnBox = false;
+          }
+      },
+
+
   }
 };
 </script>

+ 279 - 12
src/views/exportTrade/purchaseContract/index.vue

@@ -1,13 +1,27 @@
 <template>
     <div>
         <basic-container v-show="show" class="page-crad">
-            <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
+            <el-tabs v-model="tabsType" type="card" @tab-click="handleClick">
+                <el-tab-pane label="待采购" name="first"></el-tab-pane>
+                <el-tab-pane label="业务单据" name="second"></el-tab-pane>
+            </el-tabs>
+            <avue-crud v-show="tabsType == 'first'" :option="procureOption" :data="procureData" @refresh-change="listBYStatusfun"  >
+                <template slot-scope="scope" slot="menu">
+                    <el-button type="text" size="small"
+                               @click.stop="procureViewfun(scope.row)">查看
+                    </el-button>
+                </template>
+            </avue-crud>
+            <avue-crud v-show="tabsType == 'second'"
+                ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
                 @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
                 @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
                 @resetColumn="resetColumn" :cell-style="cellStyle" @selection-change="selectionChange"
                 @expand-change="expandChange" @search-criteria-switch="searchCriteriaSwitch">
                 <template slot-scope="{ row }" slot="expand">
-                    <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading"
+                    <avue-crud ref="itemCrud" :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading"
+                               @resetColumn="resetColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
+                               @saveColumn="saveColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
                         :cell-style="cellStyle" class="itemTable"></avue-crud>
                 </template>
                 <template slot="createTimeSearch">
@@ -51,10 +65,8 @@
                         scope.row.strCorpName }}
                     </span>
                 </template>
-                <template slot-scope="scope" slot="orderNo">
-                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.orderNo
-                    }}
-                    </span>
+                <template slot-scope="scope" slot="srcOrderNo">
+                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.srcOrderNo }}</span>
                 </template>
                 <template slot-scope="scope" slot="fudaPurchaseStatus">
                     <span class="el-button--text">
@@ -84,7 +96,9 @@
                 </template>
             </avue-crud>
         </basic-container>
+
         <detail-page @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData" v-if="!show"></detail-page>
+
         <el-dialog title="导入采购任务" v-if="dialogVisible" :visible.sync="dialogVisible" append-to-body
             :close-on-click-modal="false" :close-on-press-escape="false" :before-close="function () {
                 dialogVisible = false; params = {}
@@ -114,6 +128,7 @@
                             @resetColumn="resetColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
                             @saveColumn="saveColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
                             @refresh-change="refreshChangeTwo" @search-change="searchChangeTwo" @search-reset="searchReset"
+                                   @selection-change="dialogSelectionChange"
                             @on-load="dialogOnLoad">
                             <template slot="menuLeft">
                                 <el-tabs v-model="activeName" @tab-click="tabHandle">
@@ -152,6 +167,41 @@
 
       <report-dialog :switchDialog="switchDialog" :reportId="params.pid" reportName="出口贸易-采购"
                      @onClose="onClose()"></report-dialog>
+
+        <el-dialog title="导入采购任务" :visible.sync="procureVisible" append-to-body>
+            <avue-crud :data="procurelistData" :option="procurelistOption" :search.sync="params" ref="dialogCrud"
+                       @refresh-change="refreshChangeTwo">
+                <template slot="menuLeft">
+                    <el-tabs v-model="activeName" @tab-click="tabHandle">
+                        <el-tab-pane label="查询结果" name="searchList" />
+                        <el-tab-pane label="已选定数据" name="importStaging" />
+                    </el-tabs>
+                </template>
+                <template slot="corpNameSearch">
+                    <crop-select v-model="params.corpId" corpType="GYS" />
+                </template>
+                <template slot="actualQuantity" slot-scope="scope">
+                    <el-input-number v-if="activeName === 'importStaging'" v-model="scope.row.actualQuantity"
+                                     :precision="2" :min="0.01" :controls="false"></el-input-number>
+                    <span v-else>{{ scope.row.actualQuantity }}</span>
+                </template>
+                <template slot-scope="scope" slot="menu">
+                    <el-button type="text" icon="el-icon-edit" size="small"
+                               @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
+                               :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                    </el-button>
+                    <el-button type="text" icon="el-icon-delete" size="small"
+                               @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                    </el-button>
+                </template>
+            </avue-crud>
+            <span slot="footer" class="dialog-footer">
+<!--                <el-button type="warning" @click="outExport">导出</el-button>-->
+                <el-button type="warning" @click="openReport">导出</el-button>
+                <el-button @click="procureVisible = false;">取 消</el-button>
+                <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
@@ -172,12 +222,182 @@ import { defaultDate } from "@/util/date";
 import { IntegerFormat } from "@/util/validate";
 import { customerParameter } from "@/enums/management-type";
 import { getToken } from "@/util/auth";
+import {customerList} from "@/api/basicData/customerInformation";
+import { detail as companyDetail } from "@/api/basicData/customerInformation"
+import {getUser as nameUser} from "@/api/system/user"
 
 export default {
     name: "customerInformation",
     data() {
         return {
-          switchDialog: false,
+            tabsType:'first',
+            procureData:[], // 待采购数据
+            // 待采购配置
+            procureOption:{
+                searchShow: true,
+                searchMenuSpan: 8,
+                border: true,
+                index: true,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                addBtn: false,
+                menuWidth: "100",
+                headerAlign: "center",
+                searchIcon: false,
+                searchIndex: 2,
+                column: [{
+                    label: "销售单号",
+                    prop: "orderNo",
+                    overHidden: true
+                },{
+                    label: "交货日期",
+                    prop: "plannedDeliveryDate",
+                    overHidden: true
+                },{
+                    label: "公司主体",
+                    prop: "belongToCorpName",
+                    overHidden: true
+                },{
+                    label: "公司主体",
+                    prop: "belongToCorpId",
+                    hide:true,
+                    overHidden: true
+                },{
+                    label: "制单人",
+                    prop: "createUserName",
+                    overHidden: true
+                },{
+                    label: "制单人",
+                    prop: "createUser",
+                    hide:true,
+                    overHidden: true
+                },{
+                    label: "制单日期",
+                    prop: "createTime",
+                    overHidden: true
+                }]
+            },
+            procureVisible:false, // 待采购弹窗
+            procurelistData:[], // 待采购弹窗列表数据
+            // 待采购弹窗待配置
+            procurelistOption: {
+                searchShow: true,
+                searchMenuSpan: 8,
+                border: true,
+                index: true,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                addBtn: false,
+                menuWidth: "100",
+                headerAlign: "center",
+                searchIcon: false,
+                searchIndex: 2,
+                tip: false,
+                column: [{
+                    label: "销售单号",
+                    prop: "billNo",
+                    searchSpan: 8,
+                    searchOrder: 1,
+                    overHidden: true
+                }, {
+                    label: "销售日期",
+                    prop: "businesDate",
+                    searchProp: "businesDateList",
+                    width: 100,
+                    type: "date",
+                    searchSpan: 8,
+                    searchRange: true,
+                    searchDefaultTime: ["00:00:00", "23:59:59"],
+                    format: "yyyy-MM-dd",
+                    valueFormat: "yyyy-MM-dd HH:mm:ss",
+                    overHidden: true
+                }, {
+                    label: "供应商",
+                    prop: "corpName",
+                    searchSpan: 8,
+                    overHidden: true
+                }, {
+                    label: "交货日期",
+                    prop: "plannedDeliveryDate",
+                    searchProp: "plannedDeliveryDateList",
+                    width: 100,
+                    type: "date",
+                    searchSpan: 8,
+                    searchRange: true,
+                    searchDefaultTime: ["00:00:00", "23:59:59"],
+                    format: "yyyy-MM-dd",
+                    valueFormat: "yyyy-MM-dd HH:mm:ss",
+                    overHidden: true
+                }, {
+                    label: "采购员",
+                    prop: "carry",
+                    overHidden: true
+                }, {
+                    label: "产品名称",
+                    prop: "cname",
+                    overHidden: true
+                }, {
+                    label: "产品编号",
+                    prop: "code",
+                    overHidden: true
+                }, {
+                    label: "产品类别",
+                    prop: "priceCategory",
+                    overHidden: true
+                }, {
+                    label: "产品型号",
+                    prop: "itemType",
+                    overHidden: true
+                }, {
+                    label: "数量",
+                    prop: "orderQuantity"
+                }, {
+                    label: "已采购数",
+                    prop: "purchaseQuantity",
+                    overHidden: true
+                }, {
+                    label: "待采数",
+                    prop: "actualQuantity",
+                    overHidden: true
+                }, {
+                    label: "螺纹",
+                    prop: "remarksOne",
+                    overHidden: true
+                }, {
+                    label: "介质",
+                    prop: "customTwo",
+                    overHidden: true
+                }, {
+                    label: "颜色",
+                    prop: "customThree",
+                    overHidden: true
+                }, {
+                    label: "电压",
+                    prop: "customFour",
+                    overHidden: true
+                }, {
+                    label: "显示全部",
+                    prop: "showAll",
+                    searchSpan: 8,
+                    searchOrder: 2,
+                    overHidden: true,
+                    type: "select",
+                    clearable: false,
+                    hide: true,
+                    showColumn: false,
+                    dicData: [{
+                        label: '需采购',
+                        value: 0
+                    }, {
+                        label: '已采购',
+                        value: 1
+                    }],
+                    searchValue: 0
+                }]
+            },
+            switchDialog: false,
             search: {
                 // businesDate: defaultDate()
                 // businesDate: ''
@@ -235,6 +455,7 @@ export default {
                 searchIcon: false,
                 searchIndex: 2,
                 tip: false,
+                selection:true,
                 column: [{
                     label: "销售单号",
                     prop: "billNo",
@@ -343,11 +564,14 @@ export default {
                 }]
             },
             dialogVisible: false,
-            itemOption: {
+            itemOption:{},
+            itemOptionList: {
                 align: "center",
-                header: false,
+                header: true,
+                addBtn:false,
                 border: true,
                 menu: false,
+                refreshBtn:false,
                 column: [
                     {
                         label: "产品类别",
@@ -420,6 +644,7 @@ export default {
     async created() {
         this.option = await this.getColumnData(this.getColumnName(2), option);
         this.dialogOption = await this.getColumnData(this.getColumnName(2.1), this.dialogOptionList);
+        this.itemOption = await this.getColumnData(this.getColumnName(2.2), this.itemOptionList);
         this.getWorkDicts("payment_term").then(res => {
             this.findObject(this.option.column, "paymentType").dicData = res.data.data;
         });
@@ -427,6 +652,7 @@ export default {
             this.findObject(this.option.column, "createUser").dicData = res.data.data;
         });
         this.option.height = window.innerHeight - 210;
+        this.listBYStatusfun() // 获取待采购数据
     },
     filters: {
         IntegerFormat(num) {
@@ -444,6 +670,29 @@ export default {
         }
     },
     methods: {
+        // 获取待采购数据
+        listBYStatusfun(){
+            listBYStatus().then(res => {
+                for (let item of res.data.data) {
+                    // 公司
+                    companyDetail(item.belongToCorpId).then(re=>{
+                        item.belongToCorpName = re.data.data.cname
+                    })
+                    // 用户
+                    nameUser(item.createUser).then(re=>{
+                        item.createUserName = re.data.data.name
+                    })
+                }
+                this.procureData = res.data.data
+                this.treeData = res.data.data
+            });
+        },
+        // 获取待采购弹窗列表数据
+        procureViewfun(row){
+            this.procurelistData = []
+            this.procureOnLoad(row.id)
+            this.procureVisible = true;
+        },
         outExport() {
             let config = { params: { ...this.params } }
             if (config.params) {
@@ -508,6 +757,10 @@ export default {
         selectionChange(list) {
             this.selectionList = list;
         },
+        // 采购任务弹窗增加多选
+        dialogSelectionChange(list){
+            this.goodsListSave = list
+        },
         //行展开数据
         expandChange(row) {
             if (!row.itemData) {
@@ -581,9 +834,11 @@ export default {
                 this.dialogPage.total = 0
             }
         },
+        // 采购任务弹窗列表选择按钮
         importStagList(row, index) {
             this.goodsListSave.push(row);
         },
+        // 采购任务弹窗列表刷新
         refreshChangeTwo() {
             this.dialogOnLoad(this.page);
         },
@@ -652,10 +907,9 @@ export default {
                 this.detailData = {
                     form: res.data.data
                 };
-
-
                 loading.close()
-                this.dialogVisible = false
+                this.procureVisible = false // 待采购弹窗关闭
+                this.dialogVisible = false // 采购任务弹窗关闭
                 this.activeName = "searchList"
                 setTimeout(() => {
                     this.show = false;
@@ -664,6 +918,7 @@ export default {
                 loading.close()
             })
         },
+        // 采购任务列表获取数据
         dialogOnLoad(page, params) {
             this.dialogLoading = true;
             params = {
@@ -680,6 +935,18 @@ export default {
                 })
             }
         },
+        // 待采购列表获取数据
+        procureOnLoad(id) {
+            let params = {
+                size: 20,
+                current: 1,
+                showAll: 0,
+                pid:id
+            }
+            listXS(params).then(res => {
+                this.procurelistData = res.data.data
+            })
+        },
         onLoad(page, params) {
             if (this.search.businesDate && this.search.businesDate.length > 0) {
                 params = {

+ 62 - 20
src/views/exportTrade/salesContract/config/mainList.json

@@ -21,14 +21,16 @@
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
-      "minWidth": 80,
+      "minWidth": 180,
+      "index": 1,
       "overHidden": true,
       "searchSpan": 8
     },
     {
       "label": "销售订单号",
       "prop": "orderNo",
-      "minWidth": 100,
+      "minWidth": 151,
+      "index": 2,
       "overHidden": true,
       "search": true,
       "searchSpan": 8
@@ -37,7 +39,8 @@
       "label": "订单日期",
       "prop": "businesDate",
       "search": true,
-      "minWidth": 80,
+      "minWidth": 100,
+      "index": 3,
       "overHidden": true,
       "searchSpan": 8,
       "type": "date",
@@ -49,45 +52,68 @@
       "prop": "plannedDeliveryDate",
       "search": true,
       "minWidth": 80,
+      "hide": true,
+      "index": 3,
       "overHidden": true,
       "searchSpan": 8,
       "type": "date",
       "format": "yyyy-MM-dd"
     },
     {
+      "label": "订单状态",
+      "prop": "orderStatus",
+      "search": true,
+      "minWidth": 70,
+      "index": 4,
+      "overHidden": true,
+      "type": "select",
+      "props": {
+        "label": "dictValue",
+        "value": "dictValue"
+      },
+      "searchSpan": 8
+    },
+    {
       "label": "价格条款",
       "prop": "priceTerms",
-      "minWidth": 80,
+      "minWidth": 70,
+      "index": 5,
       "overHidden": true
     },
     {
       "label": "收款方式",
       "prop": "paymentType",
       "minWidth": 80,
+      "hide": true,
+      "index": 5,
       "overHidden": true
     },
     {
       "label": "运输方式",
       "prop": "transport",
       "minWidth": 80,
+      "index": 6,
       "overHidden": true
     },
     {
       "label": "箱型",
       "prop": "boxPile",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "箱量",
       "prop": "boxNumber",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "起订量",
       "prop": "minOrder",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -95,6 +121,7 @@
       "label": "预计海运费",
       "prop": "predictOceanFreight",
       "minWidth": 100,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -102,6 +129,7 @@
       "label": "参考海运费",
       "prop": "referenceOceanFreight",
       "minWidth": 100,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -109,27 +137,16 @@
       "label": "实际海运费",
       "prop": "oceanFreight",
       "minWidth": 100,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
     {
-      "label": "订单状态",
-      "prop": "orderStatus",
-      "search": true,
-      "minWidth": 80,
-      "overHidden": true,
-      "type": "select",
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      },
-      "searchSpan": 8
-    },
-    {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
-      "minWidth": 80,
+      "minWidth": 140,
+      "index": 7,
       "overHidden": true,
       "searchSpan": 8
     },
@@ -137,7 +154,8 @@
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
-      "minWidth": 80,
+      "minWidth": 140,
+      "index": 8,
       "overHidden": true,
       "type": "select",
       "filterable": true,
@@ -152,6 +170,7 @@
       "label": "数量合计",
       "prop": "orderQuantity",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -159,6 +178,7 @@
       "label": "数量",
       "prop": "storageQuantity",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -166,6 +186,7 @@
       "label": "采购数",
       "prop": "purchaseQuantity",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -173,6 +194,7 @@
       "label": "发货数",
       "prop": "deliverQuantity",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -180,6 +202,7 @@
       "label": "客户收货数",
       "prop": "receiveQuantity",
       "minWidth": 90,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -187,6 +210,7 @@
       "label": "发货数量",
       "prop": "actualQuantity",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -194,54 +218,63 @@
       "label": "采购员",
       "prop": "buyerName",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "跟单员",
       "prop": "documenterName",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "提交状态",
       "prop": "fudaPurchaseStatus",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "提交日期",
       "prop": "fudaPurchaseDate",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "采购进度",
       "prop": "productionScheduling",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "进度日期",
       "prop": "productionSchedulingDate",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "跟单状态",
       "prop": "documentaryStatus",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "跟单日期",
       "prop": "documentaryDate",
       "minWidth": 80,
+      "hide": true,
       "overHidden": true
     },
     {
       "label": "产品毛利",
       "prop": "grossProfit",
       "minWidth": 80,
+      "index": 9,
       "align": "right",
       "overHidden": true
     },
@@ -249,6 +282,7 @@
       "label": "产品利率",
       "prop": "grossProfitRate",
       "minWidth": 80,
+      "index": 10,
       "align": "right",
       "overHidden": true
     },
@@ -256,6 +290,7 @@
       "label": "销售金额",
       "prop": "amount",
       "minWidth": 80,
+      "index": 11,
       "align": "right",
       "overHidden": true
     },
@@ -263,6 +298,7 @@
       "label": "采购金额",
       "prop": "purchaseAmount",
       "minWidth": 80,
+      "hide": true,
       "align": "right",
       "overHidden": true
     },
@@ -271,6 +307,7 @@
       "prop": "sysNo",
       "search": true,
       "minWidth": 80,
+      "hide": true,
       "overHidden": true,
       "searchSpan": 8
     },
@@ -278,6 +315,7 @@
       "label": "制单人",
       "prop": "createUser",
       "minWidth": 80,
+      "index": 12,
       "search": true,
       "overHidden": true,
       "type": "select",
@@ -293,6 +331,7 @@
       "label": "制单日期",
       "prop": "createTime",
       "minWidth": 80,
+      "hide": true,
       "search": true,
       "overHidden": true,
       "searchSpan": 8,
@@ -303,6 +342,7 @@
       "label": "备注",
       "prop": "orderRemark",
       "minWidth": 80,
+      "index": 13,
       "search": true,
       "overHidden": true,
       "searchSpan": 8
@@ -311,13 +351,15 @@
       "label": "采购备注",
       "prop": "purchaseRemark",
       "minWidth": 80,
+      "index": 14,
       "overHidden": true
     },
     {
       "label": "销售备注",
       "prop": "shippingRemark",
       "minWidth": 80,
-      "overHidden": true
+      "overHidden": true,
+      "hide": true
     }
   ]
 }

+ 37 - 7
src/views/exportTrade/salesContract/detailsPage.vue

@@ -139,9 +139,18 @@
                                      :disabled="detailData.status == 1"></crop-select>
                     </template>
                     <template slot="belongToCorpId">
-                        <crop-select v-model="form.belongToCorpId" @getCorpsBank="getCorpsBank" corpType="GS"
+                        <crop-select v-model="form.belongToCorpId" @getCorpData="getCorpsBank" corpType="GS"
                                      :disabled="detailData.status == 1"  source="销售"></crop-select>
                     </template>
+                    <template slot="banks">
+                        <el-select size="small" v-model="form.banks" placeholder="请选择" @change="banksChange"
+                                   clearable
+                                   :disabled="detailData.status == 1 || !form.belongToCorpId">
+                            <el-option v-for="item in banksData" :key="item.id" :label="item.accountNo"
+                                       :value="item.accountNo">
+                            </el-option>
+                        </el-select>
+                    </template>
                     <template slot="corpAttn">
                         <el-select size="small" v-model="form.corpAttn" placeholder="请选择" @change="corpAttnChange"
                                    clearable
@@ -567,6 +576,7 @@ import checkSchedule from "@/components/check/checkSchedule.vue";
 import check from "@/components/check/check.vue";
 import {getDictionary} from "@/api/system/dictbiz";
 import {getPricebankAll} from "@/api/basicData/customerInquiry";
+import {detail as customeDetail} from "@/api/basicData/customerInformation"
 export default {
   name: "detailsPageEdit",
   data() {
@@ -578,6 +588,7 @@ export default {
       goodsEditForm: {},
       billData: {}, //账单需要数据
       corpsattns: [],
+        banksData:[], // 根据公司获取数据
       financialAccountDialog: false,
       applicationDialog: false,
       oldExchange: null,
@@ -630,10 +641,9 @@ export default {
           ]
         },
         {
-          label: "系统号",
-          prop: "sysNo",
-            span: 6,
-            disabled: true
+          label: "银行信息",
+          prop: "banks",
+          span: 6,
         },
             {
                 label: "详情信息",
@@ -1502,9 +1512,29 @@ export default {
       }
     },
 
+        // 公司下拉
     getCorpsBank(row) {
-        this.form.corpsBankId = row.corpsBankId;
-        this.form.corpsBank = row.corpsBankName;
+        // this.form.corpsBankId = row.corpsBankId;
+        // this.form.corpsBank = row.corpsBankName;
+        // 获取银行信息数据
+        customeDetail(row.id).then(res=>{
+            this.banksData = res.data.data.corpsBankList
+            if (this.banksData.length > 0) {
+                this.$set(this.form,'banks',this.banksData[0].accountNo)
+                this.$set(this.form,'accountBank',this.banksData[0].accountBank)
+                this.$set(this.form,'banksAccountName',this.banksData[0].accountName)
+            }
+        })
+    },
+    // 银行信息下拉
+    banksChange(value){
+       for (let item of this.banksData) {
+           if (value == item.accountNo) {
+               this.$set(this.form,'banks',item.accountNo)
+               this.$set(this.form,'accountBank',item.accountBank)
+               this.$set(this.form,'banksAccountName',item.accountName)
+           }
+       }
     },
     // cnameData() {
     //   this.goodsoptions = []

+ 34 - 2
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -56,9 +56,12 @@
                                                   :clearable="true"
                                                   :disabled="editSave || !form.corpId"
                                                   :filterable="true"
-                                                  :buttonIf="false"
+                                                  :tableIf="false"
+                                                  :addIf="true"
                                                   :forParameter="{ key:'id', label:'accountBankNo', value:'id'}"
+                                                  @addJump="bankJump"
                                                   @corpChange="corpChange($event,'bankId')"
+                                                  @remoteMethod="bcorpsbankListfun"
                                                   @corpFocus="bcorpsbankListfun" >
                                     </search-query>
                                 </el-form-item>
@@ -416,6 +419,27 @@
         created() {
         },
         methods:{
+            // 开户账户跳转维护
+            bankJump(){
+                console.log(this.form)
+                if (this.$store.getters.CorrespondenceUnitslos) {
+                    this.$alert("往来单位已存在,请保存关闭再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: "warning",
+                        callback: action => {
+                            console.log(action,430);
+                        }
+                    });
+                    return
+                }
+                this.$router.$avueRouter.closeTag("/iosBasicData/bcorps/index");
+                this.$router.push({
+                    path: "/iosBasicData/bcorps/index",
+                    query: {
+                        id:this.form.corpId
+                    },
+                })
+            },
             // 打印
             reportRadio(val){
                 // 获取报表数据
@@ -512,6 +536,7 @@
                             this.$set(this.form,'corpCnName',item.cnName)
                             this.$set(this.form,'corpEnName',item.enName)
                             this.$set(this.form,'corpArgreementNo',item.enName)
+                            this.bcorpsbankListfun()
                         }
                     }
                 }
@@ -591,7 +616,7 @@
                 this.pageLoading = true
                 finstlbillsDetail(id).then(res=>{
                     this.form = res.data.data
-                    this.form.businessTypes = this.form.businessTypes.split(',') // 业务类型转换成数组显示
+                    this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.split(','):[] // 业务类型转换成数组显示
                     this.tableData = this.form.finStlBillsItemsList.map(item=>{
                         item.stlTtlAmountNet = Number(item.stlTtlAmount) - (Number(item.stlTtlAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
                         item.currentStlAmountNet = Number(item.unsettledAmount) - (Number(item.unsettledAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
@@ -778,6 +803,13 @@
                         item.accountBankNo = item.accountBank + ' - ' + item.accountNo
                         return item
                     })
+                    // 如果没有 id 就表示没有保存,赋值第一项数据
+                    if (!this.form.id && this.bankData.length > 0) {
+                        this.$set(this.form,'bankId',this.bankData[0].id)
+                        this.$set(this.form,'bankAccountName',this.bankData[0].accountName)
+                        this.$set(this.form,'bankAccountBank',this.bankData[0].accountBank)
+                        this.$set(this.form,'bankAccountNo',this.bankData[0].accountNo)
+                    }
                 })
             },
             // 预览报表

+ 1 - 1
src/views/iosBasicData/PaymentApplication/index.vue

@@ -31,7 +31,7 @@
                              size="small"
                              icon="el-icon-plus"
                              plain
-                             @click="newbillFun">新建账单
+                             @click="newbillFun">新建付费申请
                   </el-button>
                   <el-button type="danger"
                              size="small"

+ 10 - 0
src/views/iosBasicData/bcorps/index.vue

@@ -994,6 +994,16 @@ export default {
         this.isShow = false
         this.$store.commit("DOMIO_IN_CUL");
     }
+    // 付费申请开户账号点击跳过来的
+    if (this.$route.query.id) {
+        this.detailData.id = this.$route.query.id
+        this.$nextTick(()=>{
+            this.$refs.detail.activeName = "yhxx" // tabs切换成银行信息
+        })
+        this.isShow = false
+        this.$store.commit("DOMIO_IN_CUL");
+
+    }
     this.$store.commit("DOMIO_IN_CUL");
     this.bcorpstypedefineListfun() // 获取客户类别
     this.ifInvoiceGetWorkDictsfun() // 字典状态

+ 1 - 1
src/views/iosBasicData/fininvoicesApplyfor/index.vue

@@ -28,7 +28,7 @@
                              size="small"
                              icon="el-icon-plus"
                              plain
-                             @click="newbillFun">新建申请
+                             @click="newbillFun">新建发票申请
                   </el-button>
                   <el-button type="danger"
                              size="small"

+ 21 - 178
src/views/iosBasicData/rateManagement/detailsPage.vue

@@ -104,142 +104,10 @@ export default {
       dataList: [],
       drawer: false,
       tableHeight: 0,
+
       option: {
         menuBtn: false,
         labelWidth: 100,
-        // column: [
-        //   {
-        //     label: "货币币别",
-        //     prop: "code",
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "blur"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "货币名称",
-        //     prop: "cname",
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "blur"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "默认汇率",
-        //     prop: "parities",
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "blur"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "本位币",
-        //     prop: "standardMoney",
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "blur"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "符号",
-        //     prop: "symbol",
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: false,
-        //         message: " ",
-        //         trigger: "blur"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "汇率类型",
-        //     prop: "paritiesType",
-        //     type: "select",
-        //     filterable: true,
-        //     clearable: false,
-        //     props: {
-        //       label: "dictValue",
-        //       value: "dictValue"
-        //     },
-        //     dicData: [
-        //       {
-        //         dictValue: "年汇率",
-        //         dictKey: 0
-        //       },
-        //       {
-        //         dictValue: "月汇率",
-        //         dictKey: 1
-        //       },
-        //       {
-        //         dictValue: "日汇率",
-        //         dictKey: 2
-        //       }
-        //     ],
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "change"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "汇率年度",
-        //     prop: "annual",
-        //     type: "year",
-        //     valueFormat: "yyyy",
-        //     span: 6,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "blur"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     label: "月份",
-        //     prop: "moon",
-        //     type: "select",
-        //     filterable: true,
-        //     dicUrl: "/api/blade-system/dict-biz/dictionary?code=month",
-        //     props: {
-        //       label: "dictValue",
-        //       value: "dictKey"
-        //     },
-        //     span: 6,
-        //     display: false,
-        //     rules: [
-        //       {
-        //         required: true,
-        //         message: " ",
-        //         trigger: "change"
-        //       }
-        //     ]
-        //   },
-        //   {
-        //     prop: "button",
-        //     span: 6
-        //   }
-        // ]
         column: [
         {
               label: "货币代码",
@@ -255,11 +123,6 @@ export default {
               label: "国际三字码",
               prop: "unCode",
               span: 6,
-              // rules: [{
-              //   required: true,
-              //   message: "请输入国际三字码",
-              //   trigger: "blur"
-              // }]
             },
             {
               label: "中文名称",
@@ -285,22 +148,12 @@ export default {
               label: "货币符号",
               prop: "symbol",
               span: 6,
-              // rules: [{
-              //   required: true,
-              //   message: "请输入货币符号",
-              //   trigger: "blur"
-              // }]
             },
             {
               label: "是否本币",
               prop: "isLocal",
               type: "select",
               span: 6,
-              // rules: [{
-              //   required: true,
-              //   message: "请选择是否本币",
-              //   trigger: "blur"
-              // }],
               dicData:[{
                 label:'非本币',
                 value:0
@@ -314,11 +167,6 @@ export default {
               label: "对本币汇率",
               prop: "exrate",
               span: 6,
-              // rules: [{
-              //   required: true,
-              //   message: "请输入对本币汇率",
-              //   trigger: "blur"
-              // }]
             },
             {
               label: "国家代码",
@@ -355,13 +203,6 @@ export default {
                 }
               ],
               span: 6,
-              // rules: [
-              //   {
-              //     required: true,
-              //     message: " ",
-              //     trigger: "change"
-              //   }
-              // ]
             },
             {
               label: "汇率年度",
@@ -369,13 +210,6 @@ export default {
               type: "year",
               valueFormat: "yyyy",
               span: 6,
-              // rules: [
-              //   {
-              //     required: true,
-              //     message: " ",
-              //     trigger: "blur"
-              //   }
-              // ]
             },
             {
               label: "月份",
@@ -502,6 +336,7 @@ export default {
       return "padding:0;height:40px;";
     },
     getDetail(id) {
+        this.allloading = true
       dataDetail(id)
         .then(res => {
           this.form = res.data.data;
@@ -564,8 +399,8 @@ export default {
       };
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
-          this.onLock(data).then(res => {
-            if (res.data.code == 200) {
+          this.onLock(data).then(re => {
+            if (re.data.code == 200) {
               this.detailData.status = 2;
               this.option = this.$options.data().option;
             }
@@ -681,15 +516,23 @@ export default {
         },
   },
   watch: {
-    "form.paritiesType": function(row) {
-      if (row == "日汇率") {
-        this.findObject(this.option.column, "moon").display = true;
-      } else if (row == "月汇率") {
-        this.findObject(this.option.column, "moon").display = false;
-      } else {
-        this.findObject(this.option.column, "moon").display = false;
-      }
-    }
+
+    "form.paritiesType":{
+        // 执行方法
+        handler(row,newValue) {
+            console.log(row,522)
+            if (row == "日汇率") {
+                this.findObject(this.option.column, "moon").display = true;
+            } else if (row == "月汇率") {
+                this.findObject(this.option.column, "moon").display = false;
+            } else {
+                this.findObject(this.option.column, "moon").display = false;
+            }
+        },
+        deep: true, // 深度监听
+        immediate: true  // 第一次改变就执行
+    },
+
   }
 };
 </script>

+ 7 - 9
src/views/iosBasicData/rateManagement/index.vue

@@ -27,19 +27,16 @@
           <span>{{ row.updateUserName }}</span>
         </template>
         <template slot="menuLeft">
-          <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
-          </el-button>
+          <!--<el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除-->
+          <!--</el-button>-->
         </template>
         <template slot-scope="{ row, index }" slot="menu">
           <el-button icon="el-icon-edit" type="text" size="small" @click.stop="editOpen(row, 1)">
             编辑
           </el-button>
-          <!-- <el-button type="text" size="small" @click.stop="editOpen(row, 1)">
-            编辑
-          </el-button> -->
-          <el-button icon="el-icon-delete" type="text" size="small" @click.stop="rowDel(row, index)">
-            删除
-          </el-button>
+          <!--<el-button icon="el-icon-delete" type="text" size="small" @click.stop="rowDel(row, index)">-->
+          <!--  删除-->
+          <!--</el-button>-->
 
             <el-button v-if="row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
                        @click.stop="statusfun(row.id,0)">
@@ -95,8 +92,9 @@ export default {
         searchIndex: 3,
         calcHeight: 30,
         addBtnText: "新建币别及汇率",
+        addBtn:true,
         stripe: true,
-          menuWidth:260,
+        menuWidth:140,
         column: [
           {
             label: "编码",

+ 0 - 39
src/views/iosBasicData/rateManagement/js/optionList.js

@@ -36,45 +36,6 @@ export const optionList = {
   menu: false,
   stripe: true,
   dialogFullscreen: true,
-  // column: [{
-  //   label: "年",
-  //   prop: "annual",
-  //   width: 150,
-  //   overHidden: true,
-  // }, {
-  //   label: "月",
-  //   prop: "moon",
-  //   width: 150,
-  //   hide:true,
-  //   overHidden: true,
-  // },{
-  //   label: "日",
-  //   prop: "national",
-  //   width: 150,
-  //   overHidden: true,
-  //   hide:true,
-  //   showColumn:false,
-  // }, {
-  //   label: "应收汇率",
-  //   prop: "receivableParities",
-  //   width: 150,
-  //   overHidden: true,
-  // }, {
-  //   label: "应付汇率",
-  //   prop: "handleParities",
-  //   width: 150,
-  //   overHidden: true,
-  // }, {
-  //   label: "实收汇率",
-  //   prop: "receiptsParities",
-  //   width: 150,
-  //   overHidden: true,
-  // }, {
-  //   label: "实付汇率",
-  //   prop: "actuallyParities",
-  //   width: 150,
-  //   overHidden: true,
-  // }]
   column: [{
     label: "币种代码",
     prop: "code",

+ 10 - 0
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -226,6 +226,16 @@ export default {
                         }]
                     },
                     {
+                        label: "尺寸",
+                        prop: "goodsSize",
+                        span: 8,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },
+                    {
                         label: "产地",
                         prop: "placeProduction",
                         span: 8,

+ 6 - 0
src/views/tirePartsMall/basicData/commodityInformation/js/optionList.js

@@ -47,6 +47,12 @@ export const option = {
       overHidden: true,
     },
     {
+      label: "尺寸",
+      prop: "goodsSize",
+      search: true,
+      overHidden: true,
+    },
+    {
       label: "品牌",
       prop: "brandName",
       filterable: true,

+ 3 - 3
src/views/tirePartsMall/salesManagement/Inventory/index.vue

@@ -4,8 +4,8 @@
       <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
         ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
         @expand-change="expandChange" @refresh-change="refreshChange"
-        @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 274.4)"
-        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 274.4)" :page.sync="page">
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 274.5)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 274.5)" :page.sync="page">
         <template slot-scope="{ row }" slot="expand">
           <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
             class="itemTable"></avue-crud>
@@ -476,7 +476,7 @@ export default {
     }, 100);
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(274.4), this.optionList);
+    this.option = await this.getColumnData(this.getColumnName(274.5), this.optionList);
     this.key++
     let i = 0;
     this.option.column.forEach(item => {