浏览代码

修改bug

Qukatie 2 年之前
父节点
当前提交
8c88b8e9d3

+ 33 - 67
src/components/port-info/index.vue

@@ -1,86 +1,41 @@
 <template>
   <div>
     <div style="display:flex">
-      <el-select
-        v-model="value"
-        placeholder="请选择"
-        :disabled="disabled"
-        @input="$emit('balabala', value)"
-        filterable
-        clearable
-      >
-        <el-option
-          v-for="item in portList"
-          :key="item.id"
-          :label="item.name"
-          :value="type=='id'?item.id:item.name"
-        >
+      <el-select v-model="value" placeholder="请选择" :disabled="disabled" @input="$emit('balabala', value)" filterable
+        clearable>
+        <el-option v-for="item in portList" :key="item.id" :label="item.name" :value="type=='id'?item.id:item.name">
         </el-option>
       </el-select>
-      <el-button
-        icon="el-icon-search"
-        @click="portinfoVisible = true"
-        :disabled="disabled"
-        size="mini"
-      ></el-button>
+      <el-button icon="el-icon-search" @click="portinfoVisible = true" :disabled="disabled" size="mini"></el-button>
+      <el-tooltip v-if="refresh" effect="dark" content="获取最新资料" placement="top-start">
+        <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" @click="refreshData"
+          style="margin-left:0px;"></el-button>
+      </el-tooltip>
     </div>
-    <el-dialog
-      title="港口信息"
-      top="5vh"
-      :visible.sync="portinfoVisible"
-      width="80%"
-      append-to-body
-      @closed="closed"
-      :close-on-click-modal="false"
-      v-dialog-drag
-    >
+    <el-dialog title="港口信息" top="5vh" :visible.sync="portinfoVisible" width="80%" append-to-body @closed="closed"
+      :close-on-click-modal="false" v-dialog-drag>
       <span>
         <el-row>
           <el-col :span="4">
             <el-scrollbar>
               <basic-container>
-                <avue-tree
-                  :option="treeOption"
-                  :data="treeData"
-                  @node-click="nodeClick"
-                />
+                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
               </basic-container>
             </el-scrollbar>
           </el-col>
           <el-col :span="20">
-            <avue-crud
-              ref="crud"
-              :data="data"
-              :option="tableOption"
-              :page.sync="page"
-              :table-loading="loading"
-              v-model="form"
-              :search.sync="search"
-              :before-open="beforeOpen"
-              @size-change="sizeChange"
-              @current-change="currentChange"
-              @search-change="searchChange"
-              @refresh-change="refreshChange"
-              @row-save="rowSave"
-              @row-del="rowDel"
-              @row-update="rowUpdate"
-              @on-load="getList"
-              @saveColumn="saveColumn"
-              @tree-load="treeLoad"
-              @selection-change="selectionChange"
-            >
+            <avue-crud ref="crud" :data="data" :option="tableOption" :page.sync="page" :table-loading="loading"
+              v-model="form" :search.sync="search" :before-open="beforeOpen" @size-change="sizeChange"
+              @current-change="currentChange" @search-change="searchChange" @refresh-change="refreshChange"
+              @row-save="rowSave" @row-del="rowDel" @row-update="rowUpdate" @on-load="getList" @saveColumn="saveColumn"
+              @tree-load="treeLoad" @selection-change="selectionChange">
             </avue-crud>
           </el-col>
         </el-row>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="portinfoVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="importPort"
-          :disabled="selectionList.length != 1"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="importPort" :disabled="selectionList.length != 1">确 定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -118,7 +73,7 @@ export default {
       treeOption: {
         nodeKey: "id",
         lazy: true,
-        treeLoad: function(node, resolve) {
+        treeLoad: function (node, resolve) {
           const parentId = node.level === 0 ? 0 : node.data.id;
           getPortTypeTree(parentId).then(res => {
             resolve(
@@ -149,7 +104,11 @@ export default {
   props: {
     value: String,
     type: String,
-    disabled: Boolean
+    disabled: Boolean,
+    refresh: {
+      type: Boolean,
+      default: true
+    },
   },
   model: {
     prop: "value",
@@ -175,13 +134,18 @@ export default {
       this.$refs.crud.toggleSelection();
     },
     importPort() {
-      if(this.type == 'id'){
+      if (this.type == 'id') {
         this.$emit("balabala", this.selectionList[0].id);
-      }else {
+      } else {
         this.$emit("balabala", this.selectionList[0].name);
       }
       this.portinfoVisible = false;
     },
+    refreshData() {
+      getAllList().then(res => {
+        this.portList = res.data.data;
+      });
+    },
     //打印
     openReport() {
       this.switchDialog = !this.switchDialog;
@@ -313,4 +277,6 @@ export default {
 };
 </script>
 
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+
+</style>

+ 89 - 89
src/components/property-dialog/main.vue

@@ -1,73 +1,31 @@
 <template>
   <div>
-    <el-dialog
-      title="属性编辑"
-      class="el-dialogDeep"
-      :visible.sync="visible"
-      top="10vh"
-      width="60%"
-      append-to-body
-      @closed="closed"
-      :close-on-click-modal="false"
-      v-dialog-drag
-    >
+    <el-dialog title="属性编辑" class="el-dialogDeep" :visible.sync="visible" top="10vh" width="60%" append-to-body
+      @closed="closed" :close-on-click-modal="false" v-dialog-drag>
       <span>
-        <div class="settingBut">
-          <el-button
-            size="mini"
-            @click="saveSetting"
-            v-if="labelShow"
-            type="primary"
-            >保存</el-button
-          >
-          <el-button size="mini" @click="labelShow = false" v-if="labelShow"
-            >取消</el-button
-          >
-          <el-tooltip
-            effect="dark"
-            content="Label名设置"
-            placement="bottom"
-            v-if="!labelShow"
-          >
-            <el-button
-              icon="el-icon-setting"
-              circle
-              size="mini"
-              @click="setting"
-            ></el-button>
+        <!-- <div class="settingBut">
+          <el-button size="mini" @click="saveSetting" v-if="labelShow" type="primary">保存</el-button>
+          <el-button size="mini" @click="labelShow = false" v-if="labelShow">取消</el-button>
+          <el-tooltip effect="dark" content="Label名设置" placement="bottom" v-if="!labelShow">
+            <el-button icon="el-icon-setting" circle size="mini" @click="setting"></el-button>
           </el-tooltip>
-        </div>
+        </div> -->
         <avue-form ref="form" v-model="form" :option="option">
-          <template slot="remarksOneLabel" v-if="labelShow">
-            <el-input
-              v-model="labelForm.label1"
-              placeholder="请输入内容"
-            ></el-input>
+          <!-- <template slot="remarksOneLabel" v-if="labelShow">
+            <el-input v-model="labelForm.label1" placeholder="请输入内容"></el-input>
           </template>
           <template slot="customTwoLabel" v-if="labelShow">
-            <el-input
-              v-model="labelForm.label2"
-              placeholder="请输入内容"
-            ></el-input>
+            <el-input v-model="labelForm.label2" placeholder="请输入内容"></el-input>
           </template>
           <template slot="customThreeLabel" v-if="labelShow">
-            <el-input
-              v-model="labelForm.label3"
-              placeholder="请输入内容"
-            ></el-input>
+            <el-input v-model="labelForm.label3" placeholder="请输入内容"></el-input>
           </template>
           <template slot="customFourLabel" v-if="labelShow">
-            <el-input
-              v-model="labelForm.label4"
-              placeholder="请输入内容"
-            ></el-input>
+            <el-input v-model="labelForm.label4" placeholder="请输入内容"></el-input>
           </template>
           <template slot="customFiveLabel" v-if="labelShow">
-            <el-input
-              v-model="labelForm.label5"
-              placeholder="请输入内容"
-            ></el-input>
-          </template>
+            <el-input v-model="labelForm.label5" placeholder="请输入内容"></el-input>
+          </template> -->
         </avue-form>
       </span>
       <span slot="footer" class="dialog-footer">
@@ -83,7 +41,18 @@ export default {
   name: "property-dialog",
   data() {
     return {
-      form: {},
+      form: {
+        remarksOne: null,
+        customTwo: null,
+        customThree: null,
+        customFour: null,
+        customFive: null,
+        customSix: null,
+        customSeven: null,
+        customEight: null,
+        customNine: null,
+        customTen: null,
+      },
       visible: false,
       fromIndex: null,
       option: {
@@ -152,18 +121,44 @@ export default {
   },
   methods: {
     init(row, index) {
+      if (row.attributeList) {
+        let attributeList = []
+        let data = []
+        let propName = ["remarksOne", "customTwo", "customThree", "customFour", "customFive", "customSix", "customSeven", "customEight", "customNine", "customTen"]
+        attributeList = JSON.parse(row.attributeList)
+        attributeList.forEach((e, index) => {
+          data.push({
+            label: e.attributeName,
+            prop: propName[index],
+            span: 12,
+            type: "select",
+            dicData: e.attributeData,
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          })
+        });
+        this.option.column = data
+      }
       this.form = {
         remarksOne: row.remarksOne,
         customTwo: row.customTwo,
         customThree: row.customThree,
         customFour: row.customFour,
-        customFive: row.customFive
+        customFive: row.customFive,
+        customSix: row.customSix,
+        customSeven: row.customSeven,
+        customEight: row.customEight,
+        customNine: row.customNine,
+        customTen: row.customTen,
       };
       this.fromIndex = index;
       this.visible = true;
     },
     closed() {
-      this.form = {};
+      this.form = this.$options.data().form;
+      console.log(this.form)
       this.fromIndex = null;
     },
     importData() {
@@ -172,39 +167,44 @@ export default {
         customTwo: this.form.customTwo,
         customThree: this.form.customThree,
         customFour: this.form.customFour,
-        customFive: this.form.customFive
+        customFive: this.form.customFive,
+        customSix: this.form.customSix,
+        customSeven: this.form.customSeven,
+        customEight: this.form.customEight,
+        customNine: this.form.customNine,
+        customTen: this.form.customTen,
       };
       this.$emit("importProperty", data, this.fromIndex);
       this.visible = false;
     },
-    setting() {
-      this.labelShow = true;
-      this.labelForm = {
-        label1: this.option.column[0].label,
-        label2: this.option.column[1].label,
-        label3: this.option.column[2].label,
-        label4: this.option.column[3].label,
-        label5: this.option.column[4].label
-      };
-    },
-    saveSetting() {
-      this.option.column[0].label = this.labelForm.label1;
-      this.option.column[1].label = this.labelForm.label2;
-      this.option.column[2].label = this.labelForm.label3;
-      this.option.column[3].label = this.labelForm.label4;
-      this.option.column[4].label = this.labelForm.label5;
-      this.saveColumn();
-    },
-    async saveColumn() {
-      const inSave = await this.saveColumnData(
-        this.getColumnName(52),
-        this.option
-      );
-      if (inSave) {
-        this.$message.success("保存成功");
-        this.labelShow = false;
-      }
-    }
+    // setting() {
+    //   this.labelShow = true;
+    //   this.labelForm = {
+    //     label1: this.option.column[0].label,
+    //     label2: this.option.column[1].label,
+    //     label3: this.option.column[2].label,
+    //     label4: this.option.column[3].label,
+    //     label5: this.option.column[4].label
+    //   };
+    // },
+    // saveSetting() {
+    //   this.option.column[0].label = this.labelForm.label1;
+    //   this.option.column[1].label = this.labelForm.label2;
+    //   this.option.column[2].label = this.labelForm.label3;
+    //   this.option.column[3].label = this.labelForm.label4;
+    //   this.option.column[4].label = this.labelForm.label5;
+    //   this.saveColumn();
+    // },
+    // async saveColumn() {
+    //   const inSave = await this.saveColumnData(
+    //     this.getColumnName(52),
+    //     this.option
+    //   );
+    //   if (inSave) {
+    //     this.$message.success("保存成功");
+    //     this.labelShow = false;
+    //   }
+    // }
   }
 };
 </script>

+ 8 - 4
src/views/basicData/commodityType/configuration/partList.json

@@ -14,22 +14,26 @@
     {
       "label": "商品编号",
       "prop": "code",
-      "minwidth": 150
+      "minwidth": 150,
+      "overHidden": true
     },
     {
       "label": "商品类型",
       "prop": "goodsTypeName",
-      "minwidth": 150
+      "minwidth": 150,
+      "overHidden": true
     },
     {
       "label": "名称",
       "prop": "cname",
-      "minwidth": 200
+      "minwidth": 200,
+      "overHidden": true
     },
     {
       "label": "英文名称",
       "prop": "ename",
-      "minwidth": 200
+      "minwidth": 200,
+      "overHidden": true
     }
   ]
 }

+ 5 - 2
src/views/basicData/commodityType/detailsPageEdit.vue

@@ -81,7 +81,7 @@
             </template>
           </avue-form>
         </basic-container> -->
-        <containerTitle title="商品规格"></containerTitle>
+        <containerTitle title="商品属性"></containerTitle>
         <basic-container>
           <avue-crud :data="sftData" :option="sftOption" @row-del="rowSftDel">
             <template slot="menuLeft" slot-scope="{ row, index }">
@@ -115,6 +115,9 @@
               <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="rowAdd">选择</el-button>
             </template>
             <template slot="menu" slot-scope="{ row, index }">
+              <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowEdit(row, index)">
+                {{ row.$cellEdit ? "保存" : "编辑" }}
+              </el-button>
               <el-button type="text" size="small" @click.stop="rowDel(row, index)" icon="el-icon-delete">删除</el-button>
             </template>
             <template slot="goodNumber" slot-scope="{ row }">
@@ -1005,7 +1008,7 @@ export default {
             row.attributeNo = e.dictKey
             this.getWorkDicts(e.dictKey).then(res => {
               // row.attributeData =JSON.stringify(res.data.data);
-              this.$set(row, "attributeData",JSON.stringify(res.data.data));
+              this.$set(row, "attributeData", JSON.stringify(res.data.data));
             });
           }
         })

+ 7 - 0
src/views/exportTrade/customerInquiry/config/commodity.json

@@ -76,6 +76,13 @@
       "index": 8,
       "width": 100,
       "overHidden": true
+    },
+    {
+      "label": "配件信息",
+      "prop": "partsDescribe",
+      "index": 9,
+      "width": 200,
+      "overHidden": true
     }
   ]
 }

+ 21 - 37
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -43,28 +43,28 @@
     {
       "label": "产品属性",
       "prop": "itemProp",
-      "index": 5,
+      "index": 6,
       "width": 200,
       "overHidden": true
     },
     {
       "label": "产品描述",
       "prop": "itemDescription",
-      "index": 6,
+      "index": 7,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "产品型号",
       "prop": "itemType",
-      "index": 7,
+      "index": 8,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "采购成本",
       "prop": "purchaseCost",
-      "index": 8,
+      "index": 9,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -72,7 +72,7 @@
     {
       "label": "采购单价",
       "prop": "purchaseAmount",
-      "index": 9,
+      "index": 10,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -80,14 +80,14 @@
     {
       "label": "配件信息",
       "prop": "partsDescribe",
-      "index": 10,
+      "index": 11,
       "width": 200,
       "overHidden": true
     },
     {
       "label": "配件成本",
       "prop": "partsCost",
-      "index": 11,
+      "index": 12,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -95,7 +95,7 @@
     {
       "label": "配件价格",
       "prop": "partsPrice",
-      "index": 12,
+      "index": 13,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -103,28 +103,28 @@
     {
       "label": "配件价格描述",
       "prop": "partsPriceDescribe",
-      "index": 13,
+      "index": 14,
       "width": 120,
       "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "corpId",
-      "index": 14,
+      "index": 15,
       "width": 200,
       "overHidden": true
     },
     {
       "label": "重点推荐",
       "prop": "priorityReferrer",
-      "index": 15,
+      "index": 16,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "推荐理由",
       "prop": "referrerReason",
-      "index": 16,
+      "index": 17,
       "width": 100,
       "overHidden": true,
       "cell": true
@@ -132,7 +132,7 @@
     {
       "label": "产品价格",
       "prop": "productPrice",
-      "index": 17,
+      "index": 18,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -140,7 +140,7 @@
     {
       "label": "销售价",
       "prop": "price",
-      "index": 18,
+      "index": 19,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -148,7 +148,7 @@
     {
       "label": "单品毛利率",
       "prop": "itemMargin",
-      "index": 19,
+      "index": 20,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -156,7 +156,7 @@
     {
       "label": "计价单位",
       "prop": "unit",
-      "index": 20,
+      "index": 21,
       "width": 100,
       "overHidden": true,
       "cell": true,
@@ -170,31 +170,15 @@
     {
       "label": "数量",
       "prop": "orderQuantity",
-      "index": 21,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "保险",
-      "prop": "insurance",
       "index": 22,
       "width": 100,
       "align": "right",
       "overHidden": true
     },
     {
-      "label": "运费",
-      "prop": "freight",
-      "index": 23,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
       "label": "折扣",
       "prop": "discount",
-      "index": 24,
+      "index": 25,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -202,7 +186,7 @@
     {
       "label": "金额",
       "prop": "amount",
-      "index": 25,
+      "index": 26,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -210,7 +194,7 @@
     {
       "label": "税率",
       "prop": "taxRate",
-      "index": 26,
+      "index": 27,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -218,7 +202,7 @@
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 27,
+      "index": 28,
       "width": 100,
       "overHidden": true,
       "cell": true
@@ -226,7 +210,7 @@
     {
       "label": "商品信息",
       "prop": "productRemark",
-      "index": 28,
+      "index": 29,
       "width": 100,
       "overHidden": true,
       "cell": true

+ 187 - 50
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -31,6 +31,12 @@
           <template slot-scope="{}" slot="corpIdLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('KH')">客户名称:</span>
           </template>
+          <template slot-scope="{}" slot="portOfLoadLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('portOfLoad')">起运港:</span>
+          </template>
+          <template slot-scope="{}" slot="portOfDestinationLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('portOfLoad')">目的港:</span>
+          </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
               :disabled="detailData.status == 1"></crop-select>
@@ -48,6 +54,13 @@
           <template slot="belongToCorpId">
             <crop-select v-model="form.belongToCorpId" corpType="GS" :disabled="detailData.status == 1"></crop-select>
           </template>
+          <template slot="dateClause">
+            <el-select size="small" v-model="form.dateClause" placeholder="请选择" @change="dateClauseChange"
+              :disabled="detailData.status == 1" clearable>
+              <el-option v-for="item in dateClauseList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
+              </el-option>
+            </el-select>
+          </template>
           <template slot="priceTerms">
             <el-select size="small" v-model="form.priceTerms" placeholder="请选择" @change="priceTermsChange" clearable
               :disabled="detailData.status == 1">
@@ -134,6 +147,7 @@
               <el-button v-if="goodsEditShow && detailData.status != 1" size="small" type="primary" @click="handleSave">
                 保存明细</el-button>
               <el-button v-if="goodsEditShow" size="small" @click="handleClose">关闭明细</el-button>
+              <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
             </el-row>
             <el-row>
               <avue-form v-if="goodsEditShow" class="trading-form" v-model="goodsEditForm" :option="goodsEditOption">
@@ -156,10 +170,13 @@
               </avue-form>
             </el-row>
           </template>
+          <template slot="codeHeader" slot-scope="{column}">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('cname')">{{column.label}}</span>
+          </template>
           <template slot="menu" slot-scope="{ row, index }">
             <div style="display:flex;justify-content: center;">
               <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
-                :disabled="disabled || detailData.status == 1">{{  row.$cellEdit ? "保存" : "修改"  }}</el-button>
+                :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
               <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
                 :disabled="detailData.status == 1">删除</el-button>
               <div v-if="!goodsEditShow"
@@ -180,26 +197,26 @@
               <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value" :value="item.value">
               </el-option>
             </el-select>
-            <span v-else>{{  row.itemType  }}</span>
+            <span v-else>{{ row.itemType }}</span>
           </template>
           <template slot="ename" slot-scope="{ row, index }">
             <el-input v-if="row.$cellEdit" v-model="row.ename" size="small" placeholder="请点击右边按钮"
               @change="editChange(row)"></el-input>
-            <span v-else>{{  row.ename  }}</span>
+            <span v-else>{{ row.ename }}</span>
           </template>
           <template slot="itemProp" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
               <el-input v-model="row.itemProp" size="small" placeholder="请点击右边按钮" @change="editChange(row)"></el-input>
               <el-button icon="el-icon-edit" size="mini" @click="openProperty(row, index)"></el-button>
             </span>
-            <span v-else>{{  row.itemProp  }}</span>
+            <span v-else>{{ row.itemProp }}</span>
           </template>
           <template slot="itemDescription" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
               <el-input v-model="row.itemDescription" size="small" placeholder="请输入" @change="editChange(row)">
               </el-input>
             </span>
-            <span v-else>{{  row.itemDescription  }}</span>
+            <span v-else>{{ row.itemDescription }}</span>
           </template>
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
@@ -210,7 +227,7 @@
               </el-select>
               <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
             </span>
-            <span v-else> {{  row.cname  }}</span>
+            <span v-else> {{ row.cname }}</span>
           </template>
           <template slot="partsDescribe" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
@@ -218,65 +235,65 @@
               </el-input>
               <el-button icon="el-icon-edit" size="mini" @click="partrePick(row, index)"></el-button>
             </span>
-            <span v-else>{{  row.partsDescribe  }}</span>
+            <span v-else>{{ row.partsDescribe }}</span>
           </template>
           <template slot="priorityReferrer" slot-scope="{ row }">
             <el-checkbox :disabled="!row.$cellEdit" v-model="row.priorityReferrer" :true-label="1" :false-label="0" />
           </template>
           <template slot="corpId" slot-scope="{ row }">
-            <span>{{  row.corpName  }}</span>
+            <span>{{ row.corpName }}</span>
           </template>
           <template slot="purchaseCost" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.purchaseCost" size="small" placeholder="请输入"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
-            <span v-else>{{  row.purchaseCost | micrometerFormat  }}</span>
+            <span v-else>{{ row.purchaseCost | micrometerFormat }}</span>
           </template>
           <template slot="purchaseAmount" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" size="small" placeholder="请输入"
               @change="purchaseAmountChange(row)"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
-            <span v-else>{{  row.purchaseAmount | micrometerFormat  }}</span>
+            <span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
           </template>
           <template slot="price" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)"></el-input>
-            <span v-else>{{  row.price | micrometerFormat  }}</span>
+            <span v-else>{{ row.price | micrometerFormat }}</span>
           </template>
           <template slot="amount" slot-scope="{ row }">
-            <span>{{  row.amount | micrometerFormat  }}</span>
+            <span>{{ row.amount | micrometerFormat }}</span>
           </template>
           <template slot="orderQuantity" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.orderQuantity" size="small"
               oninput='this.value=this.value.replace(/[^(\d)]/g,"")' @change="priceChange(row)"></el-input>
-            <span v-else>{{  row.orderQuantity | IntegerFormat  }}</span>
+            <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
           </template>
           <template slot="discount" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.discount" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="discountChange(row)"></el-input>
-            <span v-else>{{  row.discount | isDiscount  }}</span>
+            <span v-else>{{ row.discount | isDiscount }}</span>
           </template>
           <template slot="insurance" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.insurance" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)"></el-input>
-            <span v-else>{{  row.insurance | micrometerFormat  }}</span>
+            <span v-else>{{ row.insurance | micrometerFormat }}</span>
           </template>
           <template slot="freight" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.freight" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)"></el-input>
-            <span v-else>{{  row.freight | micrometerFormat  }}</span>
+            <span v-else>{{ row.freight | micrometerFormat }}</span>
           </template>
           <template slot="taxRate" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.taxRate" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="taxRateChange(row)"></el-input>
-            <span v-else>{{  row.taxRate | isPercentage  }}</span>
+            <span v-else>{{ row.taxRate | isPercentage }}</span>
           </template>
           <template slot="itemMargin" slot-scope="{ row }">
-            <span>{{  row.itemMargin | isPercentage  }}</span>
+            <span>{{ row.itemMargin | isPercentage }}</span>
           </template>
         </avue-crud>
       </trade-card>
@@ -373,6 +390,7 @@ import {
 } from "@/util/calculate";
 
 import _ from "lodash";
+import { revokeWarehousing } from "../../../api/basicData/financing";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -463,6 +481,7 @@ export default {
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd 00:00:00",
             offset: 2,
+            row: true,
             rules: [
               {
                 required: true,
@@ -472,11 +491,27 @@ export default {
             ]
           },
           {
+            label: "日期条款",
+            prop: "dateClause",
+            span: 6,
+          },
+          {
             label: "日期说明",
             prop: "dateDesc",
             type: "textarea",
             minRows: 1,
+            span: 12,
+          },
+          {
+            label: "货物类型",
+            prop: "cargoType",
             span: 6,
+            type: "select",
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
           },
           {
             label: "起运港",
@@ -528,17 +563,6 @@ export default {
             }
           },
           {
-            label: "订单状态",
-            prop: "orderStatus",
-            span: 6,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
             label: "价格条款",
             prop: "priceTerms",
             span: 6
@@ -557,17 +581,17 @@ export default {
             span: 12,
           },
           {
-            label: "币别",
-            prop: "currency",
+            label: "订单状态",
+            prop: "orderStatus",
             span: 6,
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ]
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
           },
+
           {
             label: "收款方式",
             prop: "paymentType",
@@ -587,8 +611,8 @@ export default {
             span: 12,
           },
           {
-            label: "汇率",
-            prop: "exchangeRate",
+            label: "币别",
+            prop: "currency",
             span: 6,
             rules: [
               {
@@ -615,10 +639,20 @@ export default {
             label: "单票毛利",
             prop: "singleTicketMargin",
             span: 6,
-            row: true,
             disabled: true
           },
-
+          {
+            label: "汇率",
+            prop: "exchangeRate",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          },
           {
             label: "箱型",
             prop: "boxPile",
@@ -773,7 +807,8 @@ export default {
       currencyList: [],
       corpsattns: [],
       allBoxs: [],
-      search: {}
+      search: {},
+      dateClauseList: []
     };
   },
   props: {
@@ -826,9 +861,16 @@ export default {
     this.getWorkDicts("pricing_terms").then(res => {
       this.priceTermsList = res.data.data;
     });
+    this.getWorkDicts("date_clause").then(res => {
+      this.dateClauseList = res.data.data;
+    });
     this.getWorkDicts("payment_term").then(res => {
       this.paymentTermList = res.data.data;
     });
+    this.getWorkDicts("cargo_type").then(res => {
+      this.findObject(this.option.column, "cargoType").dicData =
+        res.data.data;
+    });
     getCode().then(res => {
       this.currencyList = res.data.data;
     });
@@ -885,9 +927,7 @@ export default {
           })
         } else {
           this.$router.push({
-            path: '/basicData/customerInformation/index', query: {
-              add: "New"
-            }
+            path: '/basicData/customerInformation/index',
           })
         }
       } else if (staus == 'GS') {
@@ -900,11 +940,17 @@ export default {
           })
         } else {
           this.$router.push({
-            path: '/basicData/customerManagement/companyMaterial/index', query: {
-              add: "New"
-            }
+            path: '/basicData/customerManagement/companyMaterial/index'
           })
         }
+      } else if (staus == 'portOfLoad') {
+        this.$router.push({
+          path: '/basicData/customerManagement/companyMaterial/index'
+        })
+      } else if (staus == 'cname') {
+        this.$router.push({
+          path: '/basicData/commodityType/index'
+        })
       }
 
     },
@@ -1001,6 +1047,13 @@ export default {
         }
       });
     },
+    dateClauseChange(row) {
+      this.dateClauseList.forEach(e => {
+        if (row == e.dictValue) {
+          this.form.dateDesc = e.remark;
+        }
+      });
+    },
     rowCorpData(row) {
       this.data[row.index].corpName = row.code;
     },
@@ -1044,6 +1097,21 @@ export default {
       this.goodsEditShow = false
       this.goodsEditForm = this.$options.data().goodsEditForm
     },
+    cnameData() {
+      this.goodsoptions = []
+      getGoods(1, 10).then(res => {
+        if (res.data.data.total > 0) {
+          this.goodsoptions = res.data.data.records;
+          if (Math.ceil(res.data.data.total / 10) > 1) {
+            for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+              getGoods(i, 10).then(e => {
+                this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+              });
+            }
+          }
+        }
+      });
+    },
     cnameChange(row) {
       this.goodsoptions.forEach(e => {
         if (e.id == row.itemId) {
@@ -1219,6 +1287,11 @@ export default {
       this.data[index].customThree = row.customThree;
       this.data[index].customFour = row.customFour;
       this.data[index].customFive = row.customFive;
+      this.data[index].customSix = row.customSix;
+      this.data[index].customSeven = row.customSeven;
+      this.data[index].customEight = row.customEight;
+      this.data[index].customNine = row.customNine;
+      this.data[index].customTen = row.customTen;
       this.data[index].productRemark = this.getproductRemark(this.data[index])
     },
     partClosed() {
@@ -1400,12 +1473,18 @@ export default {
                 item.customThree = this.reData.customThree;
                 item.customFour = this.reData.customFour;
                 item.customFive = this.reData.customFive;
-                item.partsList = this.reData.partsList;
+                item.customSix = this.reData.customSix;
+                item.customSeven = this.reData.customSeven;
+                item.customEight = this.reData.customEight;
+                item.customNine = this.reData.customNine;
+                item.customTen = this.reData.customTen;
+                item.item.partsList = this.reData.partsList;
                 item.partsPrice = this.reData.partsPrice;
                 item.itemDescription = e.cnameDescription;
                 item.itemType = this.reData.itemType;
                 item.tradeTerms = this.reData.tradeTerms;
                 item.partsDescribe = this.reData.partsDescribe;
+                item.attributeList = this.reData.attributeList;
                 item.purchaseCost = 0;
                 item.purchaseAmount = 0;
                 item.productPrice = productCal(
@@ -1475,6 +1554,11 @@ export default {
             customThree: null,
             customFour: null,
             customFive: null,
+            customSix: null,
+            customSeven: null,
+            customEight: null,
+            customNine: null,
+            customTen: null,
             itemDescription: e.cnameDescription,
             partsList: [],
             partsPrice: 0,
@@ -1495,12 +1579,56 @@ export default {
             exchangeRate: this.form.exchangeRate,
             partsDescribe: null,
             productRemark: e.ename,
+            attributeList: this.getAttribute(e.goodsSpecificationList),
             $cellEdit: true
           });
+          this.importPart(this.transition(e.priceBankList), this.partsSum(this.transition(e.priceBankList)), Number(this.data.length - 1))
         });
       }
       this.dialogVisible = false;
     },
+    transition(rows) {
+      let data = []
+      rows.forEach(e => {
+        data.push({
+          goodId: e.itemId,
+          goodTypeId: e.goodTypeId,
+          goodTypeName: e.goodsTypeName,
+          ename: e.ename,
+          corpId: e.corpId,
+          corpName: e.corpName,
+          goodName: e.cname,
+          price: e.purchaseAmount,
+          goodNumber: 1,
+          amout: e.purchaseAmount,
+          partsCost: costCal(e.price, e.taxRate),
+          $cellEdit: true
+        })
+      })
+      return data
+    },
+    partsSum(rows) {
+      let qtySum = 0;
+      let amountSum = 0;
+      let amoutSum = 0;
+      rows.forEach(e => {
+        qtySum = _.add(qtySum, Number(e.goodNumber));
+        amountSum = _.add(amountSum, Number(e.amout));
+        amoutSum = Number(amountSum).toFixed(2);
+      });
+      return amoutSum
+    },
+    getAttribute(rows) {
+      let data = []
+      rows.forEach(e => {
+        data.push({
+          attributeData: JSON.parse(e.attributeData),
+          attributeName: e.attributeName,
+          attributeNo: e.attributeNo,
+        })
+      })
+      return JSON.stringify(data);
+    },
     closeGoods() {
       this.selectionList = [];
       this.treeDeptId = "";
@@ -1556,6 +1684,11 @@ export default {
           customThree: null,
           customFour: null,
           customFive: null,
+          customSix: null,
+          customSeven: null,
+          customEight: null,
+          customNine: null,
+          customTen: null,
           corpId: e.corpId,
           corpName: e.corpCode,
           itemDescription: e.cnameDescription,
@@ -1972,6 +2105,10 @@ export default {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();
         });
+        this.getWorkDicts("cargo_type").then(res => {
+          this.findObject(this.tableOption.column, "cargoType").dicData =
+            res.data.data;
+        });
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;

+ 21 - 37
src/views/exportTrade/salesContract/config/customerContact.json

@@ -45,28 +45,28 @@
     {
       "label": "产品属性",
       "prop": "itemProp",
-      "index": 5,
+      "index": 6,
       "width": 200,
       "overHidden": true
     },
     {
       "label": "产品描述",
       "prop": "itemDescription",
-      "index": 6,
+      "index": 7,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "产品型号",
       "prop": "itemType",
-      "index": 7,
+      "index": 8,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "采购成本",
       "prop": "purchaseCost",
-      "index": 8,
+      "index": 9,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -74,7 +74,7 @@
     {
       "label": "采购单价",
       "prop": "purchaseAmount",
-      "index": 9,
+      "index": 10,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -82,14 +82,14 @@
     {
       "label": "配件信息",
       "prop": "partsDescribe",
-      "index": 10,
+      "index": 11,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "配件成本",
       "prop": "partsCost",
-      "index": 11,
+      "index": 12,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -97,7 +97,7 @@
     {
       "label": "配件价格",
       "prop": "partsPrice",
-      "index": 12,
+      "index": 13,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -105,28 +105,28 @@
     {
       "label": "配件价格描述",
       "prop": "partsPriceDescribe",
-      "index": 13,
+      "index": 14,
       "width": 120,
       "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "corpId",
-      "index": 14,
+      "index": 15,
       "width": 200,
       "overHidden": true
     },
     {
       "label": "重点推荐",
       "prop": "priorityReferrer",
-      "index": 15,
+      "index": 16,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "推荐理由",
       "prop": "referrerReason",
-      "index": 16,
+      "index": 17,
       "width": 100,
       "overHidden": true,
       "cell": true
@@ -134,7 +134,7 @@
     {
       "label": "销售价",
       "prop": "price",
-      "index": 17,
+      "index": 18,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -142,7 +142,7 @@
     {
       "label": "单品毛利率",
       "prop": "itemMargin",
-      "index": 18,
+      "index": 19,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -150,7 +150,7 @@
     {
       "label": "计价单位",
       "prop": "unit",
-      "index": 19,
+      "index": 20,
       "width": 100,
       "overHidden": true,
       "cell": true,
@@ -164,7 +164,7 @@
     {
       "label": "数量",
       "prop": "orderQuantity",
-      "index": 20,
+      "index": 21,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -172,31 +172,15 @@
     {
       "label": "发货数量",
       "prop": "actualQuantity",
-      "index": 21,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "保险",
-      "prop": "insurance",
       "index": 22,
       "width": 100,
       "align": "right",
       "overHidden": true
     },
     {
-      "label": "运费",
-      "prop": "freight",
-      "index": 23,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
       "label": "折扣",
       "prop": "discount",
-      "index": 24,
+      "index": 25,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -204,7 +188,7 @@
     {
       "label": "金额",
       "prop": "amount",
-      "index": 25,
+      "index": 26,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -212,7 +196,7 @@
     {
       "label": "税率",
       "prop": "taxRate",
-      "index": 26,
+      "index": 27,
       "width": 100,
       "align": "right",
       "overHidden": true
@@ -220,7 +204,7 @@
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 27,
+      "index": 28,
       "width": 100,
       "overHidden": true,
       "cell": true
@@ -228,7 +212,7 @@
     {
       "label": "商品信息",
       "prop": "productRemark",
-      "index": 28,
+      "index": 29,
       "width": 100,
       "overHidden": true,
       "cell": true

+ 195 - 38
src/views/exportTrade/salesContract/detailsPage.vue

@@ -55,8 +55,15 @@
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
           </template>
           <template slot-scope="{}" slot="corpIdLabel">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('kh')">客户名称:</span>
           </template>
+          <template slot-scope="{}" slot="belongToCorpIdLabel"> <span style="color: #409EFF;cursor: pointer"
+              @click.stop="khEdit('GS')">公司主体:</span>
+          </template>
+          <template slot-scope="{}" slot="portOfLoadLabel"> <span style="color: #409EFF;cursor: pointer"
+              @click.stop="khEdit('portOfLoad')">起运港:</span>
+          </template> <template slot-scope="{}" slot="portOfDestinationLabel"> <span
+              style="color: #409EFF;cursor: pointer" @click.stop="khEdit('portOfLoad')">目的港:</span> </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
               :disabled="detailData.status == 1"></crop-select>
@@ -85,6 +92,13 @@
               </el-option>
             </el-select>
           </template>
+          <template slot="dateClause">
+            <el-select size="small" v-model="form.dateClause" placeholder="请选择" @change="dateClauseChange"
+              :disabled="detailData.status == 1" clearable>
+              <el-option v-for="item in dateClauseList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
+              </el-option>
+            </el-select>
+          </template>
           <template slot="businesDate">
             <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd"
               value-format="yyyy-MM-dd 00:00:00" @change="businesDateChange" :disabled="detailData.status == 1">
@@ -158,6 +172,7 @@
               <el-button v-if="goodsEditShow && detailData.status != 1" size="small" type="primary" @click="handleSave">
                 保存明细</el-button>
               <el-button v-if="goodsEditShow" size="small" @click="handleClose">关闭明细</el-button>
+              <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
             </el-row>
             <el-row>
               <avue-form v-if="goodsEditShow" class="trading-form" v-model="goodsEditForm" :option="goodsEditOption">
@@ -184,6 +199,9 @@
             <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
               :disabled="detailData.status == 1" circle></el-button>
           </template>
+          <template slot="codeHeader" slot-scope="{column}"> <span style="color: #409EFF;cursor: pointer"
+              @click.stop="khEdit('cname')">{{column.label}}</span>
+          </template>
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
               <el-select v-model="row.itemId" placeholder="请选择" size="small" style="width:60%"
@@ -532,16 +550,32 @@ export default {
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd 00:00:00",
+          row: true,
           offset: 2
         },
         {
+          label: "日期条款",
+          prop: "dateClause",
+          span: 6,
+        },
+        {
           label: "日期说明",
           prop: "dateDesc",
           type: "textarea",
           minRows: 1,
+          span: 12,
+        },
+        {
+          label: "货物类型",
+          prop: "cargoType",
           span: 6,
+          type: "select",
+          dicData: [],
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          }
         },
-
         {
           label: "起运港",
           prop: "portOfLoad",
@@ -588,17 +622,6 @@ export default {
           }
         },
         {
-          label: "订单状态",
-          prop: "orderStatus",
-          span: 6,
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          }
-        },
-        {
           label: "价格条款",
           prop: "priceTerms",
           span: 6
@@ -611,14 +634,15 @@ export default {
           span: 12,
         },
         {
-          label: "币别",
-          prop: "currency",
+          label: "订单状态",
+          prop: "orderStatus",
           span: 6,
-          rules: [{
-            required: true,
-            message: "",
-            trigger: "blur"
-          }]
+          type: "select",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          }
         },
         {
           label: "收款方式",
@@ -639,16 +663,16 @@ export default {
           span: 12,
         },
         {
-          label: "汇率",
-          prop: "exchangeRate",
+          label: "币别",
+          prop: "currency",
           span: 6,
-          row: true,
           rules: [{
             required: true,
             message: "",
             trigger: "blur"
           }]
         },
+
         {
           label: "产品毛利",
           prop: "grossProfit",
@@ -669,9 +693,10 @@ export default {
           disabled: true
         },
         {
-          label: "订单日期",
-          prop: "businesDate",
+          label: "汇率",
+          prop: "exchangeRate",
           span: 6,
+          row: true,
           rules: [{
             required: true,
             message: "",
@@ -697,10 +722,19 @@ export default {
         {
           label: "起订量",
           prop: "minOrder",
-          row: true,
           span: 6
         },
         {
+          label: "订单日期",
+          prop: "businesDate",
+          span: 6,
+          rules: [{
+            required: true,
+            message: "",
+            trigger: "blur"
+          }]
+        },
+        {
           label: "预计海运费",
           prop: "predictOceanFreight",
           span: 6
@@ -879,7 +913,8 @@ export default {
       paymentTermList: [],
       currencyList: [],
       allBoxs: [],
-      search: {}
+      search: {},
+      dateClauseList: []
     };
   },
   props: {
@@ -942,6 +977,13 @@ export default {
     this.getWorkDicts("payment_term").then(res => {
       this.paymentTermList = res.data.data;
     });
+    this.getWorkDicts("date_clause").then(res => {
+      this.dateClauseList = res.data.data;
+    });
+    this.getWorkDicts("cargo_type").then(res => {
+      this.findObject(this.option.column, "cargoType").dicData =
+        res.data.data;
+    });
     getCode().then(res => {
       this.currencyList = res.data.data;
     });
@@ -982,21 +1024,45 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
-    khEdit() {
-      if (this.form.corpId) {
+    khEdit(staus) {
+      if (status == 'kh') {
+        if (this.form.corpId) {
+          this.$router.push({
+            path: '/basicData/customerInformation/index',
+            query: {
+              corpId: this.form.corpId,
+              corpName: this.form.corpName
+            }
+          })
+        } else {
+          this.$router.push({
+            path: '/basicData/customerInformation/index',
+          })
+        }
+      } else if (staus == 'GS') {
+        if (this.form.corpId) {
+          this.$router.push({
+            path: '/basicData/customerManagement/companyMaterial/index',
+            query: {
+              corpId: this.form.corpId,
+              corpName: this.form.corpName
+            }
+          })
+        } else {
+          this.$router.push({
+            path: '/basicData/customerManagement/companyMaterial/index'
+          })
+        }
+      } else if (staus == 'portOfLoad') {
         this.$router.push({
-          path: '/basicData/customerInformation/index', query: {
-            corpId: this.form.corpId,
-            corpName: this.form.corpName
-          }
+          path: '/basicData/customerManagement/companyMaterial/index'
         })
-      } else {
+      } else if (staus == 'cname') {
         this.$router.push({
-          path: '/basicData/customerInformation/index', query: {
-            add: "New"
-          }
+          path: '/basicData/commodityType/index'
         })
       }
+
     },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
@@ -1100,6 +1166,21 @@ export default {
         });
       }
     },
+    cnameData() {
+      this.goodsoptions = []
+      getGoods(1, 10).then(res => {
+        if (res.data.data.total > 0) {
+          this.goodsoptions = res.data.data.records;
+          if (Math.ceil(res.data.data.total / 10) > 1) {
+            for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+              getGoods(i, 10).then(e => {
+                this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+              });
+            }
+          }
+        }
+      });
+    },
     cnameChange(row) {
       this.goodsoptions.forEach(e => {
         if (e.id == row.itemId) {
@@ -1280,6 +1361,11 @@ export default {
       this.data[index].customThree = row.customThree;
       this.data[index].customFour = row.customFour;
       this.data[index].customFive = row.customFive;
+      this.data[index].customSix = row.customSix;
+      this.data[index].customSeven = row.customSeven;
+      this.data[index].customEight = row.customEight;
+      this.data[index].customNine = row.customNine;
+      this.data[index].customTen = row.customTen;
       this.data[index].productRemark = this.getproductRemark(this.data[index])
     },
     partClosed() {
@@ -1387,6 +1473,13 @@ export default {
         this.getParities("currency");
       }
     },
+    dateClauseChange(row) {
+      this.dateClauseList.forEach(e => {
+        if (row == e.dictValue) {
+          this.form.dateDesc = e.remark;
+        }
+      });
+    },
     exchangeRateChange(row) {
       if (this.data.length > 0) {
         this.data.forEach(e => {
@@ -1472,12 +1565,18 @@ export default {
                 item.customThree = this.reData.customThree;
                 item.customFour = this.reData.customFour;
                 item.customFive = this.reData.customFive;
-                item.partsList = this.reData.partsList;
+                item.customSix = this.reData.customSix;
+                item.customSeven = this.reData.customSeven;
+                item.customEight = this.reData.customEight;
+                item.customNine = this.reData.customNine;
+                item.customTen = this.reData.customTen;
+                item.item.partsList = this.reData.partsList;
                 item.partsPrice = this.reData.ppartsPrice;
                 item.itemDescription = e.cnameDescription;
                 item.itemType = this.reData.itemType;
                 item.tradeTerms = this.reData.tradeTerms;
                 item.partsDescribe = this.reData.partsDescribe;
+                item.attributeList = this.reData.attributeList;
                 item.purchaseCost = 0;
                 item.purchaseAmount = 0;
                 item.productPrice = productCal(
@@ -1549,6 +1648,11 @@ export default {
             customThree: null,
             customFour: null,
             customFive: null,
+            customSix: null,
+            customSeven: null,
+            customEight: null,
+            customNine: null,
+            customTen: null,
             itemDescription: e.cnameDescription,
             partsList: [],
             partsPrice: 0,
@@ -1569,12 +1673,56 @@ export default {
             exchangeRate: this.form.exchangeRate,
             partsDescribe: null,
             productRemark: e.ename,
+            attributeList: this.getAttribute(e.goodsSpecificationList),
             $cellEdit: true
           });
+          this.importPart(this.transition(e.priceBankList), this.partsSum(this.transition(e.priceBankList)), Number(this.data.length - 1))
         });
       }
       this.dialogVisible = false;
     },
+    transition(rows) {
+      let data = []
+      rows.forEach(e => {
+        data.push({
+          goodId: e.itemId,
+          goodTypeId: e.goodTypeId,
+          goodTypeName: e.goodsTypeName,
+          ename: e.ename,
+          corpId: e.corpId,
+          corpName: e.corpName,
+          goodName: e.cname,
+          price: e.purchaseAmount,
+          goodNumber: 1,
+          amout: e.purchaseAmount,
+          partsCost: costCal(e.price, e.taxRate),
+          $cellEdit: true
+        })
+      })
+      return data
+    },
+    partsSum(rows) {
+      let qtySum = 0;
+      let amountSum = 0;
+      let amoutSum = 0;
+      rows.forEach(e => {
+        qtySum = _.add(qtySum, Number(e.goodNumber));
+        amountSum = _.add(amountSum, Number(e.amout));
+        amoutSum = Number(amountSum).toFixed(2);
+      });
+      return amoutSum
+    },
+    getAttribute(rows) {
+      let data = []
+      rows.forEach(e => {
+        data.push({
+          attributeData: JSON.parse(e.attributeData),
+          attributeName: e.attributeName,
+          attributeNo: e.attributeNo,
+        })
+      })
+      return JSON.stringify(data);
+    },
     closeGoods() {
       this.selectionList = [];
       this.treeDeptId = "";
@@ -1634,6 +1782,11 @@ export default {
           customThree: null,
           customFour: null,
           customFive: null,
+          customSix: null,
+          customSeven: null,
+          customEight: null,
+          customNine: null,
+          customTen: null,
           corpId: e.corpId,
           corpName: e.corpCode,
           itemDescription: e.cnameDescription,
@@ -2117,6 +2270,10 @@ export default {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();
         });
+        this.getWorkDicts("cargo_type").then(res => {
+          this.findObject(this.tableOption.column, "cargoType").dicData =
+            res.data.data;
+        });
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }

+ 49 - 72
src/views/maintenance/priceManagement/detailsPageEdit.vue

@@ -3,15 +3,11 @@
     <div class="customer-head">
       <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-                   @click="backToList">返回列表
+          @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button
-          class="el-button--small-yh add-customer-btn"
-          type="primary"
-          :disabled="disabled"
-          @click="editCustomer"
-      >{{ form.id ? '确认修改' : '确认新增' }}
+      <el-button class="el-button--small-yh add-customer-btn" type="primary" :disabled="disabled" @click="editCustomer">
+        {{ form.id ? '确认修改' : '确认新增' }}
       </el-button>
     </div>
     <div style="margin-top: 60px">
@@ -21,11 +17,14 @@
           <el-row>
             <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
               <el-form-item label-width="150px" :label="item.label" :prop="item.prop" :rules="item.rules">
-                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
+                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
+                  size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" />
                 <span v-else-if="item.type === 'select'">
-                  <el-select v-model="form[item.prop]" slot="prepend" style="width: 100%;" size="small" placeholder="请选择">
-                  <el-option v-for="(item,index2) in item.dicData" :key="index2" :label="item.label" :value="item.value"></el-option>
-                </el-select>
+                  <el-select v-model="form[item.prop]" slot="prepend" style="width: 100%;" size="small"
+                    placeholder="请选择">
+                    <el-option v-for="(item,index2) in item.dicData" :key="index2" :label="item.label"
+                      :value="item.value"></el-option>
+                  </el-select>
                 </span>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
               </el-form-item>
@@ -34,79 +33,57 @@
         </basic-container>
         <containerTitle title="发货信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
-          <avue-crud
-              :option="customerContact"
-              v-model="contactsForm"
-              :data="contactsData"
-              ref="crudContact"
-              @row-save="rowSave"
-              @row-click="handleRowClick"
-              @row-update="rowUpdate"
-              @row-del="rowDel">
+          <avue-crud :option="customerContact" v-model="contactsForm" :data="contactsData" ref="crudContact"
+            @row-save="rowSave" @row-click="handleRowClick" @row-update="rowUpdate" @row-del="rowDel">
             <template slot="code" slot-scope="{row,index}">
               <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
               <span style="margin-left: 12px;padding-top: 2px">{{ row.code }}</span>
-              <el-button type="text" v-if="row.$cellEdit" size="mini" style="float: right" @click="commodityChoice(row,index)">选择</el-button>
+              <el-button type="text" v-if="row.$cellEdit" size="mini" style="float: right"
+                @click="commodityChoice(row,index)">选择</el-button>
             </template>
             <template slot-scope="{row,index}" slot="menu">
-              <el-button
-                  type="text"
-                  size="small"
-                  @click="rowCell(row,index)"
-              >{{ row.$cellEdit ? '保存' : '修改' }}
+              <el-button type="text" size="small" @click="rowCell(row,index)">{{ row.$cellEdit ? '保存' : '修改' }}
               </el-button>
             </template>
           </avue-crud>
         </basic-container>
       </el-form>
     </div>
-    <el-dialog
-      title="导入商品"
-      append-to-body
-      class="el-dialogDeep"
-      :visible.sync="dialogVisible"
-      width="80%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false">
+    <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false">
       <el-row style="height: 0;">
         <el-col :span="5">
           <div>
             <el-scrollbar>
               <basic-container>
-                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
+                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
               </basic-container>
             </el-scrollbar>
           </div>
         </el-col>
         <el-col :span="19">
           <basic-container>
-            <avue-crud :option="optionTwo"
-                       :table-loading="loading"
-                       :data="data"
-                       ref="crud"
-                       @refresh-change="refreshChange"
-                       @selection-change="selectionChange"
-                       :page.sync="page"
-                       @on-load="onLoad">
+            <avue-crud :option="optionTwo" :table-loading="loading" :data="data" ref="crud"
+              @refresh-change="refreshChange" @selection-change="selectionChange" :page.sync="page" @on-load="onLoad">
 
             </avue-crud>
           </basic-container>
         </el-col>
       </el-row>
       <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="importGoods()" :disabled="this.tableData.length == 1 ? false:true">导 入</el-button>
-        </span>
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="importGoods()" :disabled="this.tableData.length == 1 ? false:true">导 入
+        </el-button>
+      </span>
     </el-dialog>
   </div>
 </template>
 <script>
 import customerContact from "./configuration/customerContact.json"
-import {detail,corpsattn,typeSave} from "@/api/maintenance/priceManagement"
+import { detail, corpsattn, typeSave } from "@/api/maintenance/priceManagement"
 import commodity from "../../salesManagement/salesContract/config/commodity.json";
-import {getList} from "@/api/basicData/configuration"
-import {getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
+import { getList } from "@/api/basicData/configuration"
+import { getDeptLazyTreeTwo } from "@/api/basicData/basicFeesDesc";
 
 export default {
   name: "detailsPage",
@@ -142,13 +119,13 @@ export default {
           }, {
             label: '状态',
             prop: 'status',
-            type:'select',
-            dicData:[{
-              label:'正常',
-              value:0
-            },{
-              label:'停用',
-              value:1
+            type: 'select',
+            dicData: [{
+              label: '正常',
+              value: 0
+            }, {
+              label: '停用',
+              value: 1
             }],
             rules: [
               {
@@ -201,9 +178,9 @@ export default {
         ]
       },
       //导入商品
-      detailsSelect:"",
-      treeDeptId:'',
-      tableData:[],
+      detailsSelect: "",
+      treeDeptId: '',
+      tableData: [],
       dialogVisible: false,
       treeOption: {
         nodeKey: 'id',
@@ -242,7 +219,7 @@ export default {
   //初始化查询
   created() {
     if (this.$route.query.id) {
-      detail(JSON.parse(this.$route.query.id)).then(res =>{
+      detail(JSON.parse(this.$route.query.id)).then(res => {
         this.form = res.data.data
         this.contactsData = res.data.data.priceItemList
         delete this.form.priceItemList
@@ -254,9 +231,8 @@ export default {
   },
   watch: {
     '$route'(to, from) {
-      console.log(to, from);
       if (this.$route.query.id) {
-
+        console.log(to, from);
       } else {
         this.form = {}
       }
@@ -313,12 +289,12 @@ export default {
       this.$refs["form"].validate((valid) => {
         //校验明细列表
         let valids = true;
-        if(this.contactsData.length !=0){
-          this.contactsData.forEach((item) =>{
-            if((!item.code || !item.bigCharacter) && valids){
+        if (this.contactsData.length != 0) {
+          this.contactsData.forEach((item) => {
+            if ((!item.code || !item.bigCharacter) && valids) {
               this.$message({
                 type: "warning",
-                message: "请检查明细列表第 "+(item.$index +1 )+" 行必填项"
+                message: "请检查明细列表第 " + (item.$index + 1) + " 行必填项"
               });
               valids = false;
             }
@@ -326,7 +302,7 @@ export default {
         }
         if (valid && valids) {
           this.form.priceItemList = this.contactsData
-          typeSave(this.form).then(res=>{
+          typeSave(this.form).then(res => {
             this.$message({
               type: "success",
               message: this.form.id ? "修改成功!" : "新增成功!"
@@ -339,7 +315,7 @@ export default {
       });
     },
     //选择
-    commodityChoice(row,index){
+    commodityChoice(row, index) {
       this.dialogVisible = true;
       this.detailsSelect = index
     },
@@ -370,8 +346,8 @@ export default {
       });
     },
     //导入
-    importGoods(){
-      if(this.tableData){
+    importGoods() {
+      if (this.tableData) {
         this.contactsData[this.detailsSelect].code = this.tableData[0].code;
         this.dialogVisible = !this.dialogVisible
       }
@@ -431,7 +407,8 @@ export default {
     margin: 1vh auto 0 !important;
     padding-bottom: 10px !important;
 
-    .el-dialog__body, .el-dialog__footer {
+    .el-dialog__body,
+    .el-dialog__footer {
       padding-bottom: 0 !important;
       padding-top: 0 !important;
     }

+ 0 - 1
src/views/purchase/stockBill/config/mainList.json

@@ -22,7 +22,6 @@
   "stripe": true,
   "searchIndex": 2,
   "searchLabelWidth": 100,
-  "stripe": true,
   "showSummary": true,
   "summaryText": "合计",
   "sumColumnList": [

+ 6 - 2
src/views/reimbursement/detail.vue

@@ -20,6 +20,10 @@
           size="small">审核进度</el-button>
         <el-button type="primary" v-if="!checkDisabled" :disabled="!form.id || disabled" size="small"
           @click="pleaseCheck" :loading="btnLoading">请核</el-button>
+          <el-button v-if="form.status == 3" type="primary" size="small" class="el-button--small-yh"
+          @click.stop="openCheckDialog">
+          报销
+        </el-button>
         <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc" :loading="btnLoading" v-if="false">
           复制单据</el-button>
         <el-button type="primary" @click="editCustomer" size="small" :disabled="form.status > 0 && form.status !== 2" :loading="btnLoading">
@@ -230,8 +234,8 @@ export default {
             slot: true,
           },
           {
-            label: "所属公司编码",
-            prop: "belongToCorpCode",
+            label: "实报金额",
+            prop: "totalAmount",
             span: 8,
             slot: true,
           },

+ 23 - 0
src/views/system/user.vue

@@ -467,6 +467,29 @@
               ]
             },
             {
+              label: '银行信息',
+              prop: 'bankInfo',
+              icon: 'el-icon-s-finance',
+              column: [
+                {
+                  label: "开户行",
+                  prop: "bankDeposit",
+                  overHidden: true
+                },
+                {
+                  label: "银行户头",
+                  prop: "bankAccount",
+                  overHidden: true
+                },
+                {
+                  label: "账号",
+                  prop: "reimburseNumber",
+                  hide: true,
+                  overHidden: true
+                }
+              ]
+            },
+            {
               label: '职责信息',
               prop: 'dutyInfo',
               icon: 'el-icon-s-custom',