caojunjie hace 3 años
padre
commit
2cc949dfb8

+ 9 - 0
src/api/basicData/salesContract.js

@@ -19,6 +19,15 @@ export function detail(id) {
     }
   })
 }
+export function listPurchaseStatus(id) {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/listPurchaseStatus',
+    method: 'get',
+    params: {
+      id: id
+    }
+  })
+}
 //明细表删除
 export function delItem(data) {
   return request({

+ 2 - 2
src/api/exportTrade/purchaseContract.js

@@ -152,7 +152,7 @@ export function pleaseCheck(data) {
 export function generatePurchaseBill(query) {
   return request({
     url: '/api/blade-purchase-sales/exportOrder/generatePurchaseBill',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }

+ 32 - 1
src/views/exportTrade/purchaseContract/config/customerContact.json

@@ -160,11 +160,42 @@
       "width": 100,
       "align": "right",
       "overHidden": true
+    },{
+      "label": "螺纹",
+      "prop": "remarksOne",
+      "index": 15,
+      "width": 100,
+      "disabled": true,
+      "overHidden": true
+    },
+    {
+      "label": "介质",
+      "prop": "customTwo",
+      "index": 16,
+      "width": 100,
+      "disabled": true,
+      "overHidden": true
+    },
+    {
+      "label": "颜色",
+      "prop": "customThree",
+      "index": 17,
+      "width": 100,
+      "disabled": true,
+      "overHidden": true
+    },
+    {
+      "label": "电压",
+      "prop": "customFour",
+      "index": 18,
+      "width": 100,
+      "disabled": true,
+      "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 15,
+      "index": 19,
       "width": 100,
       "overHidden": true,
       "cell": true

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

@@ -45,7 +45,7 @@
     },
     {
       "label": "销售订单号",
-      "prop": "srcOrderNo",
+      "prop": "orgOrderNo",
       "search": true,
       "searchSpan": 8,
       "index": 3.1,

+ 641 - 601
src/views/exportTrade/purchaseContract/index.vue

@@ -1,157 +1,157 @@
 <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"
-        @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"
-        @search-criteria-switch="searchCriteriaSwitch"
-      >
-        <template slot="createTimeSearch">
-          <el-date-picker
-            v-model="search.createTime"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot="menuLeft">
-          <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="small"
-              @click.stop="newAdd('new')"
-          >创建单据
-          </el-button>
-          <el-button
-              type="success"
-              size="small"
-              @click.stop="copyDoc()"
-              :disabled="selectionList.length != 1"
-          >复制单据
-          </el-button>
-          <el-button type="info" size="small" disabled>报表打印</el-button>
-          <el-button type="warning" size="small" @click="dialogVisible = true;">采购任务</el-button>
-        </template>
-        <template slot="corpIdSearch">
-          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
-        </template>
-        <template slot="businesDateSearch">
-          <el-date-picker
-            v-model="search.businesDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']">
-          </el-date-picker>
-        </template>
-        <template slot="plannedDeliveryDateSearch">
-          <el-date-picker
-            v-model="search.plannedDeliveryDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot="requiredDeliveryDateSearch">
-          <el-date-picker
-            v-model="search.requiredDeliveryDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot-scope="scope" slot="corpId">
+    <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"
+                    @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"
+                    @search-criteria-switch="searchCriteriaSwitch"
+            >
+                <template slot="createTimeSearch">
+                    <el-date-picker
+                            v-model="search.createTime"
+                            type="daterange"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"
+                            format="yyyy-MM-dd"
+                            value-format="yyyy-MM-dd HH:mm:ss"
+                            :default-time="['00:00:00', '23:59:59']"
+                    >
+                    </el-date-picker>
+                </template>
+                <template slot="menuLeft">
+                    <el-button
+                            type="primary"
+                            icon="el-icon-plus"
+                            size="small"
+                            @click.stop="newAdd('new')"
+                    >创建单据
+                    </el-button>
+                    <el-button
+                            type="success"
+                            size="small"
+                            @click.stop="copyDoc()"
+                            :disabled="selectionList.length != 1"
+                    >复制单据
+                    </el-button>
+                    <el-button type="info" size="small" disabled>报表打印</el-button>
+                    <el-button type="warning" size="small" @click="dialogVisible = true;">采购任务</el-button>
+                </template>
+                <template slot="corpIdSearch">
+                    <crop-select v-model="search.corpId" corpType="KH"></crop-select>
+                </template>
+                <template slot="businesDateSearch">
+                    <el-date-picker
+                            v-model="search.businesDate"
+                            type="daterange"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"
+                            format="yyyy-MM-dd"
+                            value-format="yyyy-MM-dd HH:mm:ss"
+                            :default-time="['00:00:00', '23:59:59']">
+                    </el-date-picker>
+                </template>
+                <template slot="plannedDeliveryDateSearch">
+                    <el-date-picker
+                            v-model="search.plannedDeliveryDate"
+                            type="daterange"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"
+                            format="yyyy-MM-dd"
+                            value-format="yyyy-MM-dd HH:mm:ss"
+                            :default-time="['00:00:00', '23:59:59']"
+                    >
+                    </el-date-picker>
+                </template>
+                <template slot="requiredDeliveryDateSearch">
+                    <el-date-picker
+                            v-model="search.requiredDeliveryDate"
+                            type="daterange"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"
+                            format="yyyy-MM-dd"
+                            value-format="yyyy-MM-dd HH:mm:ss"
+                            :default-time="['00:00:00', '23:59:59']"
+                    >
+                    </el-date-picker>
+                </template>
+                <template slot-scope="scope" slot="corpId">
           <span
-            style="color: #409EFF;cursor: pointer"
-            @click.stop="editOpen(scope.row, 1)"
-            >{{ scope.row.strCorpName }}
+                  style="color: #409EFF;cursor: pointer"
+                  @click.stop="editOpen(scope.row, 1)"
+          >{{ scope.row.strCorpName }}
           </span>
-        </template>
-        <template slot-scope="scope" slot="orderNo">
+                </template>
+                <template slot-scope="scope" slot="orderNo">
           <span
-            style="color: #409EFF;cursor: pointer"
-            @click.stop="editOpen(scope.row, 1)"
-            >{{ scope.row.orderNo }}
+                  style="color: #409EFF;cursor: pointer"
+                  @click.stop="editOpen(scope.row, 1)"
+          >{{ scope.row.orderNo }}
           </span>
-        </template>
-        <template slot-scope="scope" slot="fudaPurchaseStatus">
+                </template>
+                <template slot-scope="scope" slot="fudaPurchaseStatus">
           <span class="el-button--text">
-            {{scope.row.fudaPurchaseStatus}}
+            {{ scope.row.fudaPurchaseStatus }}
           </span>
-        </template>
-        <template slot-scope="scope" slot="fudaPurchaseDate">
+                </template>
+                <template slot-scope="scope" slot="fudaPurchaseDate">
           <span class="el-button--text">
-            {{scope.row.fudaPurchaseDate}}
+            {{ scope.row.fudaPurchaseDate }}
           </span>
-        </template>
-        <template slot-scope="scope" slot="productionScheduling">
+                </template>
+                <template slot-scope="scope" slot="productionScheduling">
           <span class="el-button--text">
-            {{scope.row.productionScheduling}}
+            {{ scope.row.productionScheduling }}
           </span>
-        </template>
-        <template slot-scope="scope" slot="createUser">
-          {{ scope.row.createUserName }}
-        </template>
-        <template slot-scope="{ row }" slot="orderQuantity">
-          <span>{{ row.orderQuantity | IntegerFormat }}</span>
-        </template>
-        <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            @click.stop="rowDel(scope.row, scope.index)"
-            >删除
-          </el-button>
-        </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() {
+                </template>
+                <template slot-scope="scope" slot="createUser">
+                    {{ scope.row.createUserName }}
+                </template>
+                <template slot-scope="{ row }" slot="orderQuantity">
+                    <span>{{ row.orderQuantity | IntegerFormat }}</span>
+                </template>
+                <template slot-scope="scope" slot="menu">
+                    <el-button
+                            type="text"
+                            icon="el-icon-delete"
+                            size="small"
+                            @click.stop="rowDel(scope.row, scope.index)"
+                    >删除
+                    </el-button>
+                </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={}
         }"
-            top="1vh"
-            width="90%">
+                top="1vh"
+                width="90%">
       <span>
         <el-row>
           <el-col :span="6" style="padding: 0 10px">
@@ -188,16 +188,16 @@
           <el-col :span="18">
 <!--            :page.sync="dialogPage"-->
             <avue-crud
-                :data="dialogData"
-                :option="dialogOption"
-                :search.sync="params"
-                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">
+                    :data="dialogData"
+                    :option="dialogOption"
+                    :search.sync="params"
+                    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="activeName" @tab-click="tabHandle">
                   <el-tab-pane label="查询结果" name="searchList"/>
@@ -207,22 +207,26 @@
           <template slot="corpNameSearch">
             <crop-select v-model="params.corpId" corpType="GYS"/>
           </template>
+          <template slot="orderQuantity" slot-scope="scope">
+              <el-input-number v-if="activeName === 'importStaging'" v-model="scope.row.orderQuantity" :precision="2" :min="0.01" :controls="false"></el-input-number>
+              <span v-else>{{scope.row.orderQuantity}}</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 "
+                    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
+                    type="text"
+                    icon="el-icon-delete"
+                    size="small"
+                    @click.stop="removeStagList(scope.row, scope.index)"
+                    v-else
             >移除
             </el-button>
           </template>
@@ -230,13 +234,13 @@
           </el-col>
         </el-row>
       </span>
-      <span slot="footer" class="dialog-footer">
+            <span slot="footer" class="dialog-footer">
           <el-button type="warning" @click="outExport">导出</el-button>
         <el-button @click="dialogVisible = false;params={}">取 消</el-button>
         <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
       </span>
-    </el-dialog>
-  </div>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
@@ -264,31 +268,31 @@ export default {
             },
             treeData: [],
             avueTree: false,
-      treeOption: {
-        nodeKey: "id",
-        lazy: true,
-        treeLoad: function (node, resolve) {
-          listBYStatus({}).then(res => {
-            resolve(
-                res.data.data.map(item => {
-                  return {
-                    ...item,
-                    leaf: !item.hasChildren
-                  };
-                })
-            );
-          });
-        },
-        addBtn: false,
-        menu: false,
-        size: "small",
-          props: {
-              labelText: "标题",
-              label: "orderNo",
-              value: "id",
-              children: "children"
-          }
-      },
+            treeOption: {
+                nodeKey: "id",
+                lazy: true,
+                treeLoad: function (node, resolve) {
+                    listBYStatus({}).then(res => {
+                        resolve(
+                            res.data.data.map(item => {
+                                return {
+                                    ...item,
+                                    leaf: !item.hasChildren
+                                };
+                            })
+                        );
+                    });
+                },
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "orderNo",
+                    value: "id",
+                    children: "children"
+                }
+            },
             dialogData: [],
             goodsListShow: [],
             goodsListSave: [],
@@ -302,433 +306,469 @@ export default {
             activeName: 'searchList',
             dialogOption: {},
             dialogOptionList: {
-        searchShow: true,
-        searchMenuSpan: 16,
-        border: true,
-        index: true,
-        viewBtn: false,
-        editBtn: false,
-        delBtn: false,
-        addBtn: false,
-        menuWidth: "100",
-        headerAlign: "center",
-        searchIcon: true,
-        searchIndex: 2,
-        tip: false,
-        column: [
-            {
-          label: "销售单号",
-          prop: "billNo",
-          search: true,
-          searchSpan: 8,
-          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",
-          overHidden: true
-        }, {
-          label: "采购数",
-          prop: "purchaseQuantity",
-          overHidden: true
-        }]
-      },
-      dialogVisible: false,
-      form: {},
-      option: {},
-      parentId: 0,
-      dataList: [],
-      page: {
-        pageSize: 20,
-        currentPage: 1,
-        total: 0,
-        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-      },
-      totalTwo:0,
-      show: true,
-      detailData: {},
-      loading: false,
-      selectionList: []
-    };
-  },
-  components: { detailPage },
-  async created() {
-    this.option = await this.getColumnData(this.getColumnName(2), option);
-    this.dialogOption = await this.getColumnData(this.getColumnName(2.1), this.dialogOptionList);
-    this.getWorkDicts("payment_term").then(res => {
-      this.findObject(this.option.column, "paymentType").dicData = res.data.data;
-    });
-    gainUser().then(res => {
-      this.findObject(this.option.column, "createUser").dicData = res.data.data;
-    });
-    this.option.height = window.innerHeight - 210;
-  },
-  filters: {
-    IntegerFormat(num) {
-      return IntegerFormat(num);
-    }
-  },
-  activated(){
-    if (this.$route.query.check){
-      this.detailData = {
-        id: this.$route.query.check.billId
-      };
-      this.show = false;
-      this.$store.commit("IN_CG_STATUS");
-    }
-    },
-  methods: {
-      outExport() {
-          let config = {params: {...this.params}}
-          if (config.params) {
-              for (const propName of Object.keys(config.params)) {
-                  const value = config.params[propName];
-                  if (value !== null && typeof (value) !== "undefined") {
-                      if (value instanceof Array) {
-                          for (const key of Object.keys(value)) {
-                              let params = propName + '[' + key + ']';
-                              config.params[params] = value[key]
-                          }
-                          delete config.params[propName]
-                      }
-                  }
-              }
-          }
-          const routeData = this.$router.resolve({
-              path: '/api/blade-purchase-sales/exportOrder/listXSExport',      //跳转目标窗口的地址
-              query: {
-                  ...config.params    //括号内是要传递给新窗口的参数
-              }
-          })
-          window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
-      },
-      nodeClick(data) {
-          this.params.pid = data.id
-          this.dialogPage.currentPage = 1;
-          this.dialogOnLoad(this.dialogPage);
-      },
-      removeStagList(row, index) {
-          this.goodsListSave.splice(row.$index, 1);
-      },
-      searchCriteriaSwitch(type) {
-          if (type) {
-              this.option.height = this.option.height - 139;
-          } else {
-              this.option.height = this.option.height + 139;
-          }
-          this.$refs.crud.getTableHeight();
-      },
-      cellStyle() {
-          return "padding:0;height:40px;";
-      },
-      //删除列表后面的删除按钮触发触发(row, index, done)
-    rowDel(row, index, done) {
-      this.$confirm("确定删除数据?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "删除成功!"
-            });
-            this.onLoad(this.page, this.search);
-          }
-        });
-      });
-    },
-    selectionChange(list) {
-      this.selectionList = list;
-    },
-    copyDoc() {
-      this.selectionList.forEach(e => {
-        this.detailData = {
-          id: e.id,
-          status: "copy"
-        };
-        this.show = false;
-      });
-    },
-    copyOrder(id) {
-      this.show = true;
-      this.detailData = {
-        id: id,
-        status: "copy"
-      };
-      this.$nextTick(() => {
-        this.show = false;
-      });
-    },
-    editOpen(row, status) {
-      this.detailData = {
-        id: row.id,
-        status: status
-      };
-      this.show = false;
-    },
-    //点击搜索按钮触发
-    searchChange(params, done) {
-      if (params.businesDate) {
-        params.businesStartDate = params.businesDate[0];
-        params.businesEndDate = params.businesDate[1];
-      }
-      if (params.requiredDeliveryDate) {
-        params.requiredDeliveryStartDate = params.requiredDeliveryDate[0];
-        params.requiredDeliveryEndDate = params.requiredDeliveryDate[1];
-      }
-      delete params.businesDate;
-      delete params.requiredDeliveryDate;
-      this.page.currentPage = 1;
-      this.onLoad(this.page, params);
-      done();
-    },
-    currentChange(val) {
-      this.page.currentPage = val;
-    },
-    sizeChange(val) {
-      this.page.currentPage = 1;
-      this.page.pageSize = val;
-    },
-    // 标签页切换
-    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);
-    },
-    refreshChangeTwo(){
-      this.dialogOnLoad(this.page);
-    },
-    searchChangeTwo(params, done) {
-      done()
-      if (!this.params.pid && !this.params.billNo) {
-        return this.$message.error("请选择左边单号或输入销售单号")
-      } else {
-        this.dialogOnLoad(this.page);
-      }
-    },
-    searchReset() {
-      this.avueTree = !this.avueTree
-      this.$refs.singleTable.setCurrentRow([]);
-      this.dialogData = []
-    },
-    //自定义列保存
-    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;
-      }
-    },
-    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({ids:ids.join(',')}).then(res=>{
-        this.$message.success("导入成功")
-        this.detailData = {
-          form: res.data.data
+                searchShow: true,
+                searchMenuSpan: 16,
+                border: true,
+                index: true,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                addBtn: false,
+                menuWidth: "100",
+                headerAlign: "center",
+                searchIcon: true,
+                searchIndex: 2,
+                tip: false,
+                column: [{
+                    label: "销售单号",
+                    prop: "billNo",
+                    search: true,
+                    searchSpan: 8,
+                    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: "remarksOne",
+                    overHidden: true
+                }, {
+                    label: "介质",
+                    prop: "customTwo",
+                    overHidden: true
+                }, {
+                    label: "颜色",
+                    prop: "customThree",
+                    overHidden: true
+                }, {
+                    label: "电压",
+                    prop: "customFour",
+                    overHidden: true
+                }, {
+                    label: "显示全部",
+                    prop: "showAll",
+                    searchSpan: 8,
+                    overHidden: true,
+                    type: "select",
+                    clearable:false,
+                    search: true,
+                    hide: true,
+                    showColumn: false,
+                    dicData: [{
+                        label: '不显示',
+                        value: 0
+                    }, {
+                        label: '显示',
+                        value: 1
+                    }],
+                    searchValue: 0
+                }]
+            },
+            dialogVisible: false,
+            form: {},
+            option: {},
+            parentId: 0,
+            dataList: [],
+            page: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+            },
+            totalTwo: 0,
+            show: true,
+            detailData: {},
+            loading: false,
+            selectionList: []
         };
-        loading.close()
-        this.dialogVisible = false
-        setTimeout(() => {
-          this.show = false;
-        }, 200);
-      }).catch(()=>{
-        loading.close()
-      })
-    },
-    dialogOnLoad(page, params) {
-      this.dialogLoading = true;
-      params = {
-        ...params,
-        size: page.pageSize,
-        current: page.currentPage,
-        ...this.params
-      }
-      if (this.params.pid || this.params.billNo) {
-        listXS(params).then(res => {
-          this.dialogLoading = false
-          this.dialogData = res.data.data
-          // this.dialogPage.total = res.data.data.total
-        })
-      }
     },
-    onLoad(page, params) {
-      if (this.search.businesDate && this.search.businesDate.length > 0) {
-        params = {
-          ...params,
-          orderStartDate: this.search.businesDate[0],
-          orderEndDate: this.search.businesDate[1]
-        };
-        delete params.businesDate;
-      }
-
-      if (this.search.requiredDeliveryDate && this.search.requiredDeliveryDate.length > 0) {
-        params = {
-          ...params,
-          requiredDeliveryStartDate: this.search.requiredDeliveryDate[0],
-          requiredDeliveryEndDate: this.search.requiredDeliveryDate[1]
-        };
-        delete params.requiredDeliveryDate
-      }
-      this.loading = true;
-      getList(page.currentPage, page.pageSize, params)
-        .then(res => {
-          this.dataList = res.data.data.records ? res.data.data.records : [];
-          this.page.total = res.data.data.total;
-        })
-        .finally(() => {
-          this.loading = false;
+    components: {detailPage},
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(2), option);
+        this.dialogOption = await this.getColumnData(this.getColumnName(2.1), this.dialogOptionList);
+        this.getWorkDicts("payment_term").then(res => {
+            this.findObject(this.option.column, "paymentType").dicData = res.data.data;
         });
+        gainUser().then(res => {
+            this.findObject(this.option.column, "createUser").dicData = res.data.data;
+        });
+        this.option.height = window.innerHeight - 210;
     },
-    refreshChange() {
-      this.onLoad(this.page, this.search);
-    },
-    newAdd(type) {
-      this.detailData = {
-        pageType: type
-      };
-      this.show = false;
+    filters: {
+        IntegerFormat(num) {
+            return IntegerFormat(num);
+        }
     },
-    goBack() {
-      this.detailData = this.$options.data().detailData;
-      this.show = true;
-      this.onLoad(this.page, this.search);
+    activated() {
+        if (this.$route.query.check) {
+            this.detailData = {
+                id: this.$route.query.check.billId
+            };
+            this.show = false;
+            this.$store.commit("IN_CG_STATUS");
+        }
     },
-    async saveColumn() {
-      const inSave = await this.saveColumnData(
-        this.getColumnName(2),
-        this.option
-      );
-        if (inSave) {
+    methods: {
+        outExport() {
+            let config = {params: {...this.params}}
+            if (config.params) {
+                for (const propName of Object.keys(config.params)) {
+                    const value = config.params[propName];
+                    if (value !== null && typeof (value) !== "undefined") {
+                        if (value instanceof Array) {
+                            for (const key of Object.keys(value)) {
+                                let params = propName + '[' + key + ']';
+                                config.params[params] = value[key]
+                            }
+                            delete config.params[propName]
+                        }
+                    }
+                }
+            }
+            const routeData = this.$router.resolve({
+                path: '/api/blade-purchase-sales/exportOrder/listXSExport',      //跳转目标窗口的地址
+                query: {
+                    ...config.params    //括号内是要传递给新窗口的参数
+                }
+            })
+            window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+        },
+        nodeClick(data) {
+            this.params.pid = data.id
+            this.dialogPage.currentPage = 1;
+            this.dialogOnLoad(this.dialogPage);
+        },
+        removeStagList(row, index) {
+            this.goodsListSave.splice(row.$index, 1);
+        },
+        searchCriteriaSwitch(type) {
+            if (type) {
+                this.option.height = this.option.height - 139;
+            } else {
+                this.option.height = this.option.height + 139;
+            }
+            this.$refs.crud.getTableHeight();
+        },
+        cellStyle() {
+            return "padding:0;height:40px;";
+        },
+        //删除列表后面的删除按钮触发触发(row, index, done)
+        rowDel(row, index, done) {
+            this.$confirm("确定删除数据?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                remove(row.id).then(res => {
+                    if (res.data.code == 200) {
+                        this.$message({
+                            type: "success",
+                            message: "删除成功!"
+                        });
+                        this.onLoad(this.page, this.search);
+                    }
+                });
+            });
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        copyDoc() {
+            this.selectionList.forEach(e => {
+                this.detailData = {
+                    id: e.id,
+                    status: "copy"
+                };
+                this.show = false;
+            });
+        },
+        copyOrder(id) {
+            this.show = true;
+            this.detailData = {
+                id: id,
+                status: "copy"
+            };
             this.$nextTick(() => {
-                this.$refs.crud.doLayout();
+                this.show = false;
             });
-            this.$message.success("保存成功");
-            //关闭窗口
-            this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        },
+        editOpen(row, status) {
+            this.detailData = {
+                id: row.id,
+                status: status
+            };
+            this.show = false;
+        },
+        //点击搜索按钮触发
+        searchChange(params, done) {
+            if (params.businesDate) {
+                params.businesStartDate = params.businesDate[0];
+                params.businesEndDate = params.businesDate[1];
+            }
+            if (params.requiredDeliveryDate) {
+                params.requiredDeliveryStartDate = params.requiredDeliveryDate[0];
+                params.requiredDeliveryEndDate = params.requiredDeliveryDate[1];
+            }
+            delete params.businesDate;
+            delete params.requiredDeliveryDate;
+            this.page.currentPage = 1;
+            this.onLoad(this.page, params);
+            done();
+        },
+        currentChange(val) {
+            this.page.currentPage = val;
+        },
+        sizeChange(val) {
+            this.page.currentPage = 1;
+            this.page.pageSize = val;
+        },
+        // 标签页切换
+        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);
+        },
+        refreshChangeTwo() {
+            this.dialogOnLoad(this.page);
+        },
+        searchChangeTwo(params, done) {
+            done()
+            if (!this.params.pid && !this.params.billNo) {
+                return this.$message.error("请选择左边单号或输入销售单号")
+            } else {
+                this.dialogOnLoad(this.page);
+            }
+        },
+        searchReset() {
+            this.avueTree = !this.avueTree
+            this.params.showAll = 0
+            this.$refs.singleTable.setCurrentRow([]);
+            this.dialogData = []
+        },
+        //自定义列保存
+        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;
+            }
+        },
+        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("导入成功")
+                this.detailData = {
+                    form: res.data.data
+                };
+                loading.close()
+                this.dialogVisible = false
+                setTimeout(() => {
+                    this.show = false;
+                }, 200);
+            }).catch(() => {
+                loading.close()
+            })
+        },
+        dialogOnLoad(page, params) {
+            this.dialogLoading = true;
+            params = {
+                ...params,
+                size: page.pageSize,
+                current: page.currentPage,
+                ...this.params
+            }
+            if (this.params.pid || this.params.billNo) {
+                listXS(params).then(res => {
+                    this.dialogLoading = false
+                    this.dialogData = res.data.data
+                    // this.dialogPage.total = res.data.data.total
+                })
+            }
+        },
+        onLoad(page, params) {
+            if (this.search.businesDate && this.search.businesDate.length > 0) {
+                params = {
+                    ...params,
+                    orderStartDate: this.search.businesDate[0],
+                    orderEndDate: this.search.businesDate[1]
+                };
+                delete params.businesDate;
+            }
+
+            if (this.search.requiredDeliveryDate && this.search.requiredDeliveryDate.length > 0) {
+                params = {
+                    ...params,
+                    requiredDeliveryStartDate: this.search.requiredDeliveryDate[0],
+                    requiredDeliveryEndDate: this.search.requiredDeliveryDate[1]
+                };
+                delete params.requiredDeliveryDate
+            }
+            this.loading = true;
+            getList(page.currentPage, page.pageSize, params)
+                .then(res => {
+                    this.dataList = res.data.data.records ? res.data.data.records : [];
+                    this.page.total = res.data.data.total;
+                })
+                .finally(() => {
+                    this.loading = false;
+                });
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.search);
+        },
+        newAdd(type) {
+            this.detailData = {
+                pageType: type
+            };
+            this.show = false;
+        },
+        goBack() {
+            this.detailData = this.$options.data().detailData;
+            this.show = true;
+            this.onLoad(this.page, this.search);
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(2),
+                this.option
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        async resetColumn() {
+            this.option = option;
+            const inSave = await this.delColumnData(this.getColumnName(2), option);
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("重置成功");
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        handleCurrentChange(val) {
+            // this.currentRow = val;
+            this.params.pid = val.id
+            this.dialogPage.currentPage = 1;
+            this.dialogOnLoad(this.dialogPage);
         }
     },
-      async resetColumn() {
-          this.option = option;
-          const inSave = await this.delColumnData(this.getColumnName(2), option);
-          if (inSave) {
-              this.$nextTick(() => {
-                  this.$refs.crud.doLayout();
-              });
-              this.$message.success("重置成功");
-              this.$refs.crud.$refs.dialogColumn.columnBox = false;
-          }
-      },
-      handleCurrentChange(val) {
-          // this.currentRow = val;
-          this.params.pid = val.id
-          this.dialogPage.currentPage = 1;
-          this.dialogOnLoad(this.dialogPage);
-      }
-  },
-  watch: {
-      option: function () {
-          this.search.businesDate = defaultDate();
-      },
-      dialogVisible: function () {
-          this.goodsListShow = []
-          this.goodsListSave = []
-          this.totalTwo = 0
-          listBYStatus({}).then(res => {
-              this.treeData = res.data.data
-          });
-      }
-  }
+    watch: {
+        option: function () {
+            this.search.businesDate = defaultDate();
+        },
+        dialogVisible: function () {
+            this.goodsListShow = []
+            this.goodsListSave = []
+            this.totalTwo = 0
+            listBYStatus({}).then(res => {
+                this.treeData = res.data.data
+            });
+        }
+    }
 };
 </script>
 
 <style scoped>
 ::v-deep .select-component {
-  display: flex;
+    display: flex;
 }
+
 .page-crad ::v-deep .basic-container__card {
-  height: 94.2vh;
+    height: 94.2vh;
 }
 </style>

+ 1 - 1
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -20,7 +20,7 @@
           </el-button>
           <el-button :type="form.fudaPurchaseStatus?'success':'warning'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 1">通知采购</el-button>
           <el-button :type="form.documentaryStatus?'primary':'warning'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 2">通知跟单</el-button>
-          <el-button type="primary" size="small" :disabled="form.status > 0 || (!form.status && form.status !== 0)" @click.native="pleaseCheck">请核数据</el-button>
+<!--          <el-button type="primary" size="small" :disabled="form.status > 0 || (!form.status && form.status !== 0)" @click.native="pleaseCheck">请核数据</el-button>-->
         </el-row>
       </template>
       <template slot="headerSerial">

+ 5 - 70
src/views/exportTrade/salesContract/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "headerAlign": "center",
-  "menuWidth": "70",
+  "menuWidth": "150",
   "searchIcon": true,
   "searchIndex": 2,
   "searchLabelWidth": 90,
@@ -21,7 +21,6 @@
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
-      "index": 1,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8
@@ -30,7 +29,6 @@
       "label": "订单日期",
       "prop": "businesDate",
       "search": true,
-      "index": 2,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8,
@@ -40,7 +38,6 @@
     {
       "label": "销售订单号",
       "prop": "orderNo",
-      "index": 3,
       "minWidth": 100,
       "overHidden": true,
       "search": true,
@@ -50,7 +47,6 @@
       "label": "预交日期",
       "prop": "plannedDeliveryDate",
       "search": true,
-      "index": 4,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8,
@@ -60,42 +56,36 @@
     {
       "label": "价格条款",
       "prop": "priceTerms",
-      "index": 5,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "收款方式",
       "prop": "paymentType",
-      "index": 5,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "运输方式",
       "prop": "transport",
-      "index": 6,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "箱型",
       "prop": "boxPile",
-      "index": 7,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "箱量",
       "prop": "boxNumber",
-      "index": 8,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "起订量",
       "prop": "minOrder",
-      "index": 8,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -103,7 +93,6 @@
     {
       "label": "预计海运费",
       "prop": "predictOceanFreight",
-      "index": 8,
       "minWidth": 100,
       "align": "right",
       "overHidden": true
@@ -111,7 +100,6 @@
     {
       "label": "参考海运费",
       "prop": "referenceOceanFreight",
-      "index": 8,
       "minWidth": 100,
       "align": "right",
       "overHidden": true
@@ -119,7 +107,6 @@
     {
       "label": "实际海运费",
       "prop": "oceanFreight",
-      "index": 8,
       "minWidth": 100,
       "align": "right",
       "overHidden": true
@@ -128,7 +115,6 @@
       "label": "订单状态",
       "prop": "orderStatus",
       "search": true,
-      "index": 9,
       "minWidth": 80,
       "overHidden": true,
       "type": "select",
@@ -142,7 +128,6 @@
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
-      "index": 10,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8
@@ -151,7 +136,6 @@
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
-      "index": 11,
       "minWidth": 80,
       "overHidden": true,
       "type": "select",
@@ -166,7 +150,6 @@
     {
       "label": "数量合计",
       "prop": "orderQuantity",
-      "index": 12,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -174,7 +157,6 @@
     {
       "label": "数量",
       "prop": "storageQuantity",
-      "index": 12.1,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -182,7 +164,6 @@
     {
       "label": "采购数",
       "prop": "purchaseQuantity",
-      "index": 12.2,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -190,7 +171,6 @@
     {
       "label": "发货数",
       "prop": "deliverQuantity",
-      "index": 12.3,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -198,7 +178,6 @@
     {
       "label": "客户收货数",
       "prop": "receiveQuantity",
-      "index": 12.4,
       "minWidth": 90,
       "align": "right",
       "overHidden": true
@@ -206,7 +185,6 @@
     {
       "label": "发货数量",
       "prop": "actualQuantity",
-      "index": 12.5,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -214,77 +192,54 @@
     {
       "label": "采购员",
       "prop": "buyerName",
-      "index": 12.51,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "跟单员",
       "prop": "documenterName",
-      "index": 12.52,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "采购状态",
+      "label": "提交状态",
       "prop": "fudaPurchaseStatus",
-      "index": 12.53,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "采购日期",
+      "label": "提交日期",
       "prop": "fudaPurchaseDate",
-      "index": 12.54,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "排产状态",
+      "label": "采购进度",
       "prop": "productionScheduling",
-      "index": 12.55,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "排产日期",
+      "label": "进度日期",
       "prop": "productionSchedulingDate",
-      "index": 12.56,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "预计货好状态",
-      "prop": "estimateGoodGoods",
-      "index": 12.57,
-      "minWidth": 100,
-      "overHidden": true
-    },
-    {
-      "label": "预计货好日期",
-      "prop": "estimateGoodGoodsDate",
-      "index": 12.58,
-      "minWidth": 100,
-      "overHidden": true
-    },
-    {
       "label": "跟单状态",
       "prop": "documentaryStatus",
-      "index": 12.59,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "跟单日期",
       "prop": "documentaryDate",
-      "index": 12.6,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "产品毛利",
       "prop": "grossProfit",
-      "index": 13,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -292,7 +247,6 @@
     {
       "label": "产品利率",
       "prop": "grossProfitRate",
-      "index": 14,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -300,7 +254,6 @@
     {
       "label": "销售金额",
       "prop": "amount",
-      "index": 15,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
@@ -308,27 +261,14 @@
     {
       "label": "采购金额",
       "prop": "purchaseAmount",
-      "index": 16,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "prop": "",
-      "search": true,
-      "index": 17,
-      "minWidth": 80,
-      "overHidden": true,
-      "hide": true,
-      "showColumn": false,
-      "searchSpan": 8
-    },
-    {
       "label": "系统号",
       "prop": "sysNo",
       "search": true,
-      "index": 17,
       "minWidth": 80,
       "overHidden": true,
       "searchSpan": 8
@@ -336,7 +276,6 @@
     {
       "label": "制单人",
       "prop": "createUser",
-      "index": 18,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -352,7 +291,6 @@
     {
       "label": "制单日期",
       "prop": "createTime",
-      "index": 19,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -363,7 +301,6 @@
     {
       "label": "备注",
       "prop": "orderRemark",
-      "index": 20,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -372,14 +309,12 @@
     {
       "label": "采购备注",
       "prop": "purchaseRemark",
-      "index": 21,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "销售备注",
       "prop": "shippingRemark",
-      "index": 20,
       "minWidth": 80,
       "overHidden": true
     }

+ 376 - 337
src/views/exportTrade/salesContract/detailsPage.vue

@@ -10,15 +10,22 @@
                 <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
                            @click.stop="openEdit">编辑
                 </el-button>
+                <el-button type="primary" size="small"
+                           :disabled="form.status > 0 || (!form.status && form.status !== 0)"
+                           @click.native="pleaseCheck">提交订单
+                </el-button>
                 <el-dropdown style="margin-right: 8px;margin-left: 8px;">
                     <el-button type="primary" size="small">
                         审核处理<i class="el-icon-arrow-down el-icon--right"></i>
                     </el-button>
                     <el-dropdown-menu slot="dropdown">
-                        <el-dropdown-item :disabled="form.status > 0 || (!form.status && form.status !== 0)" @click.native="pleaseCheck">请核数据
+                        <el-dropdown-item :disabled="form.status > 0 || (!form.status && form.status !== 0)"
+                                          @click.native="pleaseCheck">提交订单
+                        </el-dropdown-item>
+                        <el-dropdown-item :disabled="form>0"
+                                          @click.native="checkScheduleDialog = true,checkId = form.id">提交进度
                         </el-dropdown-item>
-                        <el-dropdown-item :disabled="form>0" @click.native="checkScheduleDialog = true,checkId = form.id">审核进度</el-dropdown-item>
-<!--                        <el-dropdown-item disabled>撤销请核</el-dropdown-item>-->
+                        <!--                        <el-dropdown-item disabled>撤销请核</el-dropdown-item>-->
                     </el-dropdown-menu>
                 </el-dropdown>
                 <el-dropdown style="margin-right: 8px;">
@@ -47,9 +54,9 @@
                 <div class="content-item">
                     <div class="card">
                         <div class="card-content">
-                            <span class="card-content-num selected">{{
-                                form.fudaPurchaseStatus ? form.fudaPurchaseStatus : '录入'
-                                }}</span>
+                            <span class="card-content-num selected">
+                                {{form.fudaPurchaseStatus ? form.fudaPurchaseStatus : '录入'}}
+                            </span>
                         </div>
                     </div>
                 </div>
@@ -57,9 +64,9 @@
                 <div class="content-item">
                     <div class="card">
                         <div class="card-content">
-                            <span class="card-content-num" :class="form.depositReceived?'selected':''">{{
-                                form.depositReceived ? form.depositReceived : '定金到账'
-                                }}</span>
+                            <span class="card-content-num" :class="form.depositReceived?'selected':''">
+                                {{form.depositReceived ? form.depositReceived : '定金到账'}}
+                            </span>
                         </div>
                     </div>
                 </div>
@@ -67,9 +74,9 @@
                 <div class="content-item">
                     <div class="card">
                         <div class="card-content">
-                            <span class="card-content-num" :class="form.productionScheduling?'selected':''">{{
-                                form.productionScheduling ? form.productionScheduling : '采购'
-                                }}</span>
+                            <span class="card-content-num" :class="form.productionScheduling?'selected':''">
+                                {{form.productionScheduling ? form.productionScheduling : '采购'}}
+                            </span>
                         </div>
                     </div>
                 </div>
@@ -77,9 +84,9 @@
                 <div class="content-item">
                     <div class="card">
                         <div class="card-content">
-                            <span class="card-content-num" :class="form.documentaryStatus?'selected':''">{{
-                                form.documentaryStatus ? form.documentaryStatus : '订舱'
-                                }}</span>
+                            <span class="card-content-num" :class="form.documentaryStatus?'selected':''">
+                                {{form.documentaryStatus ? form.documentaryStatus : '订舱'}}
+                            </span>
                         </div>
                     </div>
                 </div>
@@ -87,9 +94,9 @@
                 <div class="content-item">
                     <div class="card">
                         <div class="card-content">
-                            <span class="card-content-num" :class="form.balancePayment?'selected':''">{{
-                                form.balancePayment ? form.balancePayment : '尾款'
-                                }}</span>
+                            <span class="card-content-num" :class="form.balancePayment?'selected':''">
+                                {{form.balancePayment ? form.balancePayment : '尾款'}}
+                            </span>
                         </div>
                     </div>
                 </div>
@@ -107,11 +114,11 @@
                     <template slot-scope="{}" slot="corpIdLabel">
                         <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 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 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>
@@ -131,8 +138,8 @@
                             <el-option v-for="item in corpsattns" :key="item.id" :label="item.cname"
                                        :value="item.cname">
                             </el-option>
-            </el-select>
-          </template>
+                        </el-select>
+                    </template>
           <template slot="priceTerms">
             <el-select size="small" v-model="form.priceTerms" placeholder="请选择" @change="priceTermsChange" clearable
               :disabled="detailData.status == 1">
@@ -600,328 +607,360 @@ export default {
         {
           label: "系统号",
           prop: "sysNo",
-          span: 6,
-          disabled: true
-        },
-        {
-          label: "详情信息",
-          prop: "clientMessage",
-          type: "textarea",
-          minRows: 2,
-          span: 10
-        },
-        {
-          label: "预交日期",
-          prop: "plannedDeliveryDate",
-          span: 6,
-          type: "date",
-          format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd 00:00:00",
-          offset: 2
-        },
-        {
-          label: "销售订单号",
-          prop: "orderNo",
-          span: 6
-        },
-        {
-          label: "联系人",
-          prop: "corpAttn",
-          span: 5
-        },
-        {
-          label: "电话",
-          prop: "corpTel",
-          span: 5
-        },
-        {
-          label: "有效日期",
-          prop: "dateValidity",
-          span: 6,
-          type: "date",
-          format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd 00:00:00",
-          // row: true,
-          offset: 2,
-          rules: [
-            {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-        },
-          {
-            label: "订单日期",
-            prop: "businesDate",
             span: 6,
-            rules: [{
-              required: true,
-              message: "",
-              trigger: "blur"
-            }]
-          },
-        {
-          label: "起运港",
-          prop: "portOfLoad",
-          span: 6,
-          type: "select",
-          filterable: true,
-          rules: [{
-            required: true,
-            message: "",
-            trigger: "blur"
-          }],
-          dicData: [],
-          props: {
-            label: "name",
-            value: "name"
-          }
+            disabled: true
         },
-        {
-          label: "目的港",
-          prop: "portOfDestination",
-          span: 6,
-          type: "select",
-          filterable: true,
-          rules: [{
-            required: true,
-            message: "",
-            trigger: "blur"
-          }],
-          dicData: [],
-          props: {
-            label: "name",
-            value: "name"
-          }
-        },
-        {
-          label: "运输方式",
-          prop: "transport",
-          span: 6,
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          },
-          row: true,
-          rules: [
             {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-        },
-
-        {
-          label: "日期条款",
-          prop: "dateClause",
-          span: 6,
-          rules: [
+                label: "详情信息",
+                prop: "clientMessage",
+                type: "textarea",
+                minRows: 2,
+                span: 10
+            },
             {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-        },
-        {
-          label: "日期说明",
-          prop: "dateDesc",
-          type: "textarea",
-          minRows: 1,
-          span: 12,
-        },
-        {
-          label: "货物类型",
-          prop: "cargoType",
-          span: 6,
-          type: "select",
-          dicData: [],
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          },
-          rules: [
+                label: "预交日期",
+                prop: "plannedDeliveryDate",
+                span: 6,
+                type: "date",
+                format: "yyyy-MM-dd",
+                valueFormat: "yyyy-MM-dd 00:00:00",
+                offset: 2
+            }, {
+                label: "销售订单号",
+                prop: "orderNo",
+                span: 6
+            }, {
+                label: "联系人",
+                prop: "corpAttn",
+                span: 5
+            }, {
+                label: "电话",
+                prop: "corpTel",
+                span: 5
+            }, {
+                label: "有效日期",
+                prop: "dateValidity",
+                span: 6,
+                type: "date",
+                format: "yyyy-MM-dd",
+                valueFormat: "yyyy-MM-dd 00:00:00",
+                // row: true,
+                offset: 2,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            }, {
+                label: "订单日期",
+                prop: "businesDate",
+                span: 6,
+                rules: [{
+                    required: true,
+                    message: "",
+                    trigger: "blur"
+                }]
+            }, {
+                label: "起运港",
+                prop: "portOfLoad",
+                span: 6,
+                type: "select",
+                filterable: true,
+                rules: [{
+                    required: true,
+                    message: "",
+                    trigger: "blur"
+                }],
+                dicData: [],
+                props: {
+                    label: "name",
+                    value: "name"
+                }
+            }, {
+                label: "目的港",
+                prop: "portOfDestination",
+                span: 6,
+                type: "select",
+                filterable: true,
+                rules: [{
+                    required: true,
+                    message: "",
+                    trigger: "blur"
+                }],
+                dicData: [],
+                props: {
+                    label: "name",
+                    value: "name"
+                }
+            }, {
+                label: "运输方式",
+                prop: "transport",
+                span: 6,
+                type: "select",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
+                props: {
+                    label: "dictValue",
+                    value: "dictValue"
+                },
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            }, {
+                label: '需产地证',
+                prop: 'certificateOriginRequired',
+                type: 'select',
+                span: 6,
+                dicData: [{
+                    label: "是",
+                    value: "1"
+                }, {
+                    label: "否",
+                    value: "0"
+                }],
+                value: "1"
+            },
             {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-        },
-        {
-          label: "价格条款",
-          prop: "priceTerms",
-          span: 6,
-          rules: [
+                label: "日期条款",
+                prop: "dateClause",
+                span: 6,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            },
             {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-        },
-        {
-          label: "条款说明",
-          prop: "priceTermsDescription",
-          type: "textarea",
-          minRows: 1,
-          span: 12,
-        },
-        {
-          label: "订单状态",
-          prop: "orderStatus",
-          span: 6,
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          }
-        },
-        {
-          label: "收款方式",
-          prop: "paymentType",
-          span: 6,
-          rules: [
+                label: "日期说明",
+                prop: "dateDesc",
+                type: "textarea",
+                minRows: 1,
+                span: 12,
+            },
             {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-          // type: "select",
-          // dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
-          // props: {
-          //   label: "dictValue",
-          //   value: "dictValue"
-          // }
-        },
-        {
-          label: "收款说明",
-          prop: "paymentTypeDescription",
-          type: "textarea",
-          minRows: 1,
-          span: 12,
-        },
-        {
-          label: "币别",
-          prop: "currency",
-          span: 6,
-          rules: [{
-            required: true,
-            message: "",
-            trigger: "blur"
-          }]
-        },
-
-        {
-          label: "产品毛利",
-          prop: "grossProfit",
-          span: 8,
-          disabled: true
-        },
-        {
-          label: "产品利率",
-          prop: "grossProfitRate",
-          span: 8,
-          append: "%",
-          disabled: true
-        },
-          {
-            label: "汇率",
-            prop: "exchangeRate",
-            span: 8,
-            row: true,
-            rules: [{
-              required: true,
-              message: "",
-              trigger: "blur"
-            }]
-          }, {
-            label: "箱型",
-            prop: "boxPile",
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
+                label: "签单方式",
+                prop: "signingMethod",
+                span: 6,
+                type: "select",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=signing_method",
+                props: {
+                    label: "dictValue",
+                    value: "dictValue"
+                },
+                rules: [{
+                    required: false,
+                    message: "",
+                    trigger: "blur"
+                }]
             },
-            span: 6,
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ]
-          }, {
-            label: "箱量",
-            prop: "boxNumber",
-            span: 6,
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ]
-          }, {
-            label: "起订量",
-            prop: "minOrder",
-            span: 6
-          }, {
-            label: "预计海运费",
-            prop: "predictOceanFreight",
-            span: 6
-          },
-          {
-            label: "参考海运费",
-            prop: "referenceOceanFreight",
-            span: 6
-          }, {
-            label: "实际海运费",
-            prop: "oceanFreight",
-            span: 6,
-            // offset: 0,
-            // row: true
-          }, {
-            label: "单票毛利",
-            prop: "singleTicketMargin",
-            span: 6,
-            disabled: true,
-            row: true
-          }, {
-            label: "采购员",
-            prop: "buyerId",
-            span: 6,
-            overHidden: true,
-            filterable: true,
-            remote: true,
-            type: "select",
-            dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
-            props: {
-              label: "realName",
-              value: "id",
-              res: 'data.records'
+            {
+                label: "价格条款",
+                prop: "priceTerms",
+                span: 6,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
             },
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ]
-          }, {
-            label: "跟单员",
-            prop: "documenterId",
-            span: 6,
-            overHidden: true,
-            filterable: true,
-            remote: true,
+            {
+                label: "条款说明",
+                prop: "priceTermsDescription",
+                type: "textarea",
+                minRows: 1,
+                span: 12,
+            },
+            {
+                label: "三方检验",
+                prop: "tripartiteInspection",
+                span: 6,
+                type: "select",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=tripartite_inspection",
+                props: {
+                    label: "dictValue",
+                    value: "dictValue"
+                },
+                rules: [
+                    {
+                        required: false,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            },
+            {
+                label: "收款方式",
+                prop: "paymentType",
+                span: 6,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+                // type: "select",
+                // dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
+                // props: {
+                //   label: "dictValue",
+                //   value: "dictValue"
+                // }
+            },
+            {
+                label: "收款说明",
+                prop: "paymentTypeDescription",
+                type: "textarea",
+                minRows: 1,
+                span: 12,
+            },
+            {
+                label: "货物类型",
+                prop: "cargoType",
+                span: 6,
+                type: "select",
+                dicData: [],
+                props: {
+                    label: "dictValue",
+                    value: "dictValue"
+                },
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            },
+            {
+                label: "产品毛利",
+                prop: "grossProfit",
+                span: 6,
+                disabled: true
+            },
+            {
+                label: "产品利率",
+                prop: "grossProfitRate",
+                span: 6,
+                append: "%",
+                disabled: true
+            }, {
+                label: "汇率",
+                prop: "exchangeRate",
+                span: 6,
+                rules: [{
+                    required: true,
+                    message: "",
+                    trigger: "blur"
+                }]
+            },{
+                label: "订单状态",
+                prop: "orderStatus",
+                span: 6,
+                type: "select",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+                props: {
+                    label: "dictValue",
+                    value: "dictValue"
+                }
+            }, {
+                label: "箱型",
+                prop: "boxPile",
+                type: "select",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
+                props: {
+                    label: "dictValue",
+                    value: "dictValue"
+                },
+                span: 6,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            }, {
+                label: "箱量",
+                prop: "boxNumber",
+                span: 6,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            }, {
+                label: "起订量",
+                prop: "minOrder",
+                span: 6
+            }, {
+                label: "币别",
+                prop: "currency",
+                span: 6,
+                rules: [{
+                    required: true,
+                    message: "",
+                    trigger: "blur"
+                }]
+            }, {
+                label: "预计海运费",
+                prop: "predictOceanFreight",
+                span: 6
+            },
+            {
+                label: "参考海运费",
+                prop: "referenceOceanFreight",
+                span: 6
+            }, {
+                label: "实际海运费",
+                prop: "oceanFreight",
+                span: 6,
+                // offset: 0,
+                // row: true
+            }, {
+                label: "单票毛利",
+                prop: "singleTicketMargin",
+                span: 6,
+                disabled: true,
+                row: true
+            }, {
+                label: "采购员",
+                prop: "buyerId",
+                span: 6,
+                overHidden: true,
+                filterable: true,
+                remote: true,
+                type: "select",
+                dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
+                props: {
+                    label: "realName",
+                    value: "id",
+                    res: 'data.records'
+                },
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ]
+            }, {
+                label: "跟单员",
+                prop: "documenterId",
+                span: 6,
+                overHidden: true,
+                filterable: true,
+                remote: true,
             type: "select",
             dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
             props: {

+ 568 - 522
src/views/exportTrade/salesContract/index.vue

@@ -1,562 +1,608 @@
 <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"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        :cell-style="cellStyle"
-        :summary-method="summaryMethod"
-        @expand-change="expandChange"
-        @selection-change="selectionChange"
-        @search-criteria-switch="searchCriteriaSwitch"
-      >
-        <template slot-scope="{ row }" slot="expand">
-          <avue-crud
-            :data="row.itemData"
-            :option="itemOption"
-            :table-loading="row.itemLoading"
-            :cell-style="cellStyle"
-            class="itemTable"
-          ></avue-crud>
-        </template>
-        <template slot-scope="{ row }" slot="orderStatus">
-          <span v-for="item in orderStatusList" :style="{color: item.colour}" v-if="item.dictValue == row.orderStatus">{{row.orderStatus}}</span>
-        </template>
-        <template slot-scope="{ row }" slot="grossProfitRate">
-          {{ row.grossProfitRate }}%
-        </template>
-        <template slot-scope="{ row }" slot="createUser">
-          <span>{{ row.createUserName }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="orderQuantity">
-          <span>{{ row.orderQuantity | IntegerFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="amount">
-          <span>{{ row.amount | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="purchaseAmount">
-          <span>{{ row.purchaseAmount | decimalFormat }}</span>
-        </template>
-        <template slot="menuLeft">
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="small"
-            @click.stop="newAdd('new')"
-            >创建单据
-          </el-button>
-          <el-button
-            type="success"
-            size="small"
-            @click.stop="copyDoc()"
-            :disabled="selectionList.length != 1"
-            >复制单据</el-button
-          >
-          <el-button type="info" size="small">报表打印</el-button>
-        </template>
-        <template slot="corpIdSearch">
-          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
-        </template>
-        <template slot="portOfLoadSearch">
-          <port-info v-model="search.portOfLoad" />
-        </template>
-        <template slot="portOfDestinationSearch">
-          <port-info v-model="search.portOfDestination" />
-        </template>
-        <template slot="businesDateSearch">
-          <el-date-picker
-            v-model="search.businesDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot="plannedDeliveryDateSearch">
-          <el-date-picker
-            v-model="search.plannedDeliveryDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot="createTimeSearch">
-          <el-date-picker
-            v-model="search.createTime"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot-scope="scope" slot="corpId">
-          <span
-            style="color: #409EFF;cursor: pointer"
-            @click.stop="editOpen(scope.row, 1)"
-            >{{ scope.row.corpsName }}
-          </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>
-        <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            @click.stop="rowDel(scope.row, scope.index)"
-            >删除
-          </el-button>
-        </template>
-      </avue-crud>
-    </basic-container>
-    <detail-page
-      @goBack="goBack"
-      @copyOrder="copyOrder"
-      :detailData="detailData"
-      v-if="!show"
-    ></detail-page>
-  </div>
+    <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"
+                @search-change="searchChange"
+                @current-change="currentChange"
+                @size-change="sizeChange"
+                @refresh-change="refreshChange"
+                @on-load="onLoad"
+                @saveColumn="saveColumn"
+                @resetColumn="resetColumn"
+                :cell-style="cellStyle"
+                :summary-method="summaryMethod"
+                @expand-change="expandChange"
+                @selection-change="selectionChange"
+                @search-criteria-switch="searchCriteriaSwitch"
+            >
+                <template slot-scope="{ row }" slot="expand">
+                    <avue-crud
+                        :data="row.itemData"
+                        :option="itemOption"
+                        :table-loading="row.itemLoading"
+                        :cell-style="cellStyle"
+                        class="itemTable"
+                    ></avue-crud>
+                </template>
+                <template slot-scope="{ row }" slot="orderStatus">
+                    <span v-for="item in orderStatusList" :style="{color: item.colour}"
+                          v-if="item.dictValue == row.orderStatus">{{ row.orderStatus }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="grossProfitRate">
+                    {{ row.grossProfitRate }}%
+                </template>
+                <template slot-scope="{ row }" slot="createUser">
+                    <span>{{ row.createUserName }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="orderQuantity">
+                    <span>{{ row.orderQuantity | IntegerFormat }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="amount">
+                    <span>{{ row.amount | decimalFormat }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="purchaseAmount">
+                    <span>{{ row.purchaseAmount | decimalFormat }}</span>
+                </template>
+                <template slot="menuLeft">
+                    <el-button
+                        type="primary"
+                        icon="el-icon-plus"
+                        size="small"
+                        @click.stop="newAdd('new')"
+                    >创建单据
+                    </el-button>
+                    <el-button
+                        type="success"
+                        size="small"
+                        @click.stop="copyDoc()"
+                        :disabled="selectionList.length != 1">
+                        复制单据
+                    </el-button>
+                    <el-button type="info" size="small">报表打印</el-button>
+                </template>
+                <template slot="corpIdSearch">
+                    <crop-select v-model="search.corpId" corpType="KH"></crop-select>
+                </template>
+                <template slot="portOfLoadSearch">
+                    <port-info v-model="search.portOfLoad"/>
+                </template>
+                <template slot="portOfDestinationSearch">
+                    <port-info v-model="search.portOfDestination"/>
+                </template>
+                <template slot="businesDateSearch">
+                    <el-date-picker
+                        v-model="search.businesDate"
+                        type="daterange"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd HH:mm:ss"
+                        :default-time="['00:00:00', '23:59:59']">
+                    </el-date-picker>
+                </template>
+                <template slot="plannedDeliveryDateSearch">
+                    <el-date-picker
+                        v-model="search.plannedDeliveryDate"
+                        type="daterange"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd HH:mm:ss"
+                        :default-time="['00:00:00', '23:59:59']">
+                    </el-date-picker>
+                </template>
+                <template slot="createTimeSearch">
+                    <el-date-picker
+                        v-model="search.createTime"
+                        type="daterange"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd HH:mm:ss"
+                        :default-time="['00:00:00', '23:59:59']">
+                    </el-date-picker>
+                </template>
+                <template slot-scope="scope" slot="corpId">
+                  <span
+                      style="color: #409EFF;cursor: pointer"
+                      @click.stop="editOpen(scope.row, 1)">
+                      {{ scope.row.corpsName }}
+                  </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>
+                <template slot-scope="scope" slot="menu">
+                    <el-button
+                        type="text"
+                        icon="el-icon-search"
+                        size="small"
+                        @click.stop="procurementProgress(scope.row, scope.index)"
+                    >采购进度
+                    </el-button>
+                    <el-button
+                        type="text"
+                        icon="el-icon-delete"
+                        size="small"
+                        @click.stop="rowDel(scope.row, scope.index)"
+                    >删除
+                    </el-button>
+                </template>
+            </avue-crud>
+        </basic-container>
+        <detail-page
+            @goBack="goBack"
+            @copyOrder="copyOrder"
+            :detailData="detailData"
+            v-if="!show"
+        ></detail-page>
+        <el-dialog
+            title="采购进度"
+            :visible.sync="dialogVisible"
+            v-if="dialogVisible"
+            :append-to-body="true"
+            width="30%">
+            <span>
+                <el-table
+                    :data="purchaseStatusList"
+                    size="mini"
+                    :header-cell-style="{color: '#000000d9'}"
+                    style="width: 100%">
+                  <el-table-column
+                      prop="orderNo"
+                      align="center"
+                      :show-overflow-tooltip="true"
+                      label="采购单号">
+                  </el-table-column>
+                  <el-table-column
+                      prop="orderStatus"
+                      align="center"
+                      :show-overflow-tooltip="true"
+                      label="采购状态">
+                  </el-table-column>
+                </el-table>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false" size="mini">关 闭</el-button>
+            </span>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
 import option from "./config/mainList.json";
 import {
-  getList,
-  remove,
-  getPorts,
-  gainUser,
-  getGoodsInfo
+    getList,
+    remove,
+    getPorts,
+    gainUser,
+    getGoodsInfo, listPurchaseStatus
 } from "@/api/basicData/salesContract";
 import detailPage from "./detailsPage.vue";
-import { defaultDate } from "@/util/date";
-import { micrometerFormat, IntegerFormat,decimalFormat} from "@/util/validate";
+import {defaultDate} from "@/util/date";
+import {micrometerFormat, IntegerFormat, decimalFormat} from "@/util/validate";
 import _ from "lodash";
+
 export default {
-  name: "customerInformation",
-  data() {
-    return {
-      search: {
-        businesDate: defaultDate()
-      },
-      form: {},
-      option: {},
-      parentId: 0,
-      dataList: [],
-      page: {
-        pageSize: 20,
-        currentPage: 1,
-        total: 0,
-        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-      },
-      show: true,
-      detailData: {},
-      loading: false,
-      itemOption: {
-        align: "center",
-        header: false,
-        border: true,
-        menu: false,
-        column: [
-          {
-            label: "产品类别",
-            prop: "priceCategory",
-            width: 140,
-            overHidden: true
-          },
-          {
-            label: "产品名称",
-            prop: "cname",
-            width: 240,
-            overHidden: true
-          },
-          {
-            label: "产品描述",
-            prop: "itemDescription",
-            width: 240,
-            overHidden: true
-          },
-          {
-            label: "配件描述",
-            prop: "partsDescribe",
-            width: 240,
-            overHidden: true
-          },
-          {
-            label: "配件价格描述",
-            prop: "partsPriceDescribe",
-            width: 240,
-            overHidden: true
-          },
-          {
-            label: "数量",
-            prop: "orderQuantity",
-            width: 100,
-            overHidden: true
-          },{
-            label: "单价",
-            prop: "price",
-            width: 100,
-            overHidden: true
-          },
-          {
-            label: "金额",
-            prop: "amount",
-            width: 100,
-            overHidden: true
-          }
-        ]
-      },
-      selectionList: [],
-      orderStatusList:[]
-    };
-  },
-  components: { detailPage },
-  async created() {
-    this.option = await this.getColumnData(this.getColumnName(4), option);
-    getPorts().then(res => {
-      this.findObject(this.option.column, "portOfLoad").dicData = res.data;
-      this.findObject(this.option.column, "portOfDestination").dicData =
-        res.data;
-    });
-    this.getWorkDicts("order_status").then(res => {
-      this.findObject(this.option.column, "orderStatus").dicData =
-        res.data.data;
-      this.orderStatusList = res.data.data
-    });
-    gainUser().then(res => {
-      this.findObject(this.option.column, "createUser").dicData = res.data.data;
-    });
-  },
-  filters: {
-    IntegerFormat(num) {
-      return IntegerFormat(num);
-    },
-    decimalFormat(num){
-      return decimalFormat(num);
-    }
-  },
-  activated() {
-    if (!this.$store.getters.xsStatus && !this.show) {
-      this.show = true;
-    }
-    if (this.$route.query.id) {
-      setTimeout(() => {
-        this.editOpen({ id: this.$route.query.id }, 1);
-      }, 100);
-    }
-    if (this.$route.query.check){
-      this.detailData = {
-        id: this.$route.query.check.billId
-      };
-      this.show = false;
-      this.$store.commit("IN_XS_STATUS");
-    }
-    if (this.$route.query.params){
-      this.detailData = {
-        id: this.$route.query.params
-      };
-      this.show = false;
-      this.$store.commit("IN_XS_STATUS");
-    }
-  },
-  methods: {
-    searchCriteriaSwitch(type) {
-      if (type) {
-        this.option.height = this.option.height - 191;
-      } else {
-        this.option.height = this.option.height + 191;
-      }
-      this.$refs.crud.getTableHeight();
-    },
-    cellStyle() {
-      return "padding:0;height:40px;";
-    },
-    selectionChange(list) {
-      this.selectionList = list;
-    },
-    expandChange(row) {
-      if (!row.itemData) {
-        getGoodsInfo({ id: row.id, tradeType: "CK" })
-          .then(res => {
-            this.dataList[row.$index].itemData = res.data.data;
-          })
-          .finally(() => {
-            this.dataList[row.$index].itemLoading = false;
-          });
-      }
+    name: "customerInformation",
+    data() {
+        return {
+            dialogVisible: false,
+            purchaseStatusList: [],
+            search: {
+                businesDate: defaultDate()
+            },
+            form: {},
+            option: {},
+            parentId: 0,
+            dataList: [],
+            page: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+            },
+            show: true,
+            detailData: {},
+            loading: false,
+            itemOption: {
+                align: "center",
+                header: false,
+                border: true,
+                menu: false,
+                column: [
+                    {
+                        label: "产品类别",
+                        prop: "priceCategory",
+                        width: 140,
+                        overHidden: true
+                    },
+                    {
+                        label: "产品名称",
+                        prop: "cname",
+                        width: 240,
+                        overHidden: true
+                    },
+                    {
+                        label: "产品描述",
+                        prop: "itemDescription",
+                        width: 240,
+                        overHidden: true
+                    },
+                    {
+                        label: "配件描述",
+                        prop: "partsDescribe",
+                        width: 240,
+                        overHidden: true
+                    },
+                    {
+                        label: "配件价格描述",
+                        prop: "partsPriceDescribe",
+                        width: 240,
+                        overHidden: true
+                    },
+                    {
+                        label: "数量",
+                        prop: "orderQuantity",
+                        width: 100,
+                        overHidden: true
+                    }, {
+                        label: "单价",
+                        prop: "price",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "金额",
+                        prop: "amount",
+                        width: 100,
+                        overHidden: true
+                    }
+                ]
+            },
+            selectionList: [],
+            orderStatusList: []
+        };
     },
-    //删除列表后面的删除按钮触发触发(row, index, done)
-    rowDel(row, index, done) {
-      this.$confirm("确定删除数据?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "删除成功!"
-            });
-            this.onLoad(this.page, this.search);
-          }
+    components: {detailPage},
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(4), option);
+        getPorts().then(res => {
+            this.findObject(this.option.column, "portOfLoad").dicData = res.data;
+            this.findObject(this.option.column, "portOfDestination").dicData =
+                res.data;
         });
-      });
-    },
-    //查看跳转页面
-    editOpen(row, status) {
-      if (this.$route.query.id) {
-        this.$router.$avueRouter.closeTag(this.$route.fullPath);
-        this.$router.push({
-          path: "/exportTrade/salesContract/index"
+        this.getWorkDicts("order_status").then(res => {
+            this.findObject(this.option.column, "orderStatus").dicData =
+                res.data.data;
+            this.orderStatusList = res.data.data
+        });
+        gainUser().then(res => {
+            this.findObject(this.option.column, "createUser").dicData = res.data.data;
         });
-      }
-      this.detailData = {
-        id: row.id,
-        status: status
-      };
-      this.show = false;
-      this.$store.commit("IN_XS_STATUS");
-    },
-    //点击搜索按钮触发
-    searchChange(params, done) {
-      if (params.businesDate) {
-        params.orderStartDate = params.businesDate[0];
-        params.orderEndDate = params.businesDate[1];
-      }
-      if (params.plannedDeliveryDate) {
-        params.plannedDeliveryStart = params.plannedDeliveryDate[0];
-        params.plannedDeliveryEnd = params.plannedDeliveryDate[1];
-      }
-      if (params.createTime) {
-        params.createTimeStart = params.createTime[0];
-        params.createTimeEnd = params.createTime[1];
-      }
-      delete params.businesDate;
-      delete params.plannedDeliveryDate;
-      delete params.createTime;
-      this.page.currentPage = 1;
-      this.onLoad(this.page, params);
-      done();
-    },
-    currentChange(val) {
-      this.page.currentPage = val;
     },
-    sizeChange(val) {
-      this.page.currentPage = 1;
-      this.page.pageSize = val;
+    filters: {
+        IntegerFormat(num) {
+            return IntegerFormat(num);
+        },
+        decimalFormat(num) {
+            return decimalFormat(num);
+        }
     },
-    onLoad(page, params) {
-      if (this.search.businesDate && this.search.businesDate.length > 0) {
-        params = {
-          ...params,
-          orderStartDate: this.search.businesDate[0],
-          orderEndDate: this.search.businesDate[1]
-        };
-        delete params.businesDate;
-      }
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false);
-      });
-      getList(page.currentPage, page.pageSize, params).then(res => {
-        if (res.data.data.records) {
-          res.data.data.records.forEach(e => {
-            e.itemLoading = true;
-          });
+    activated() {
+        if (!this.$store.getters.xsStatus && !this.show) {
+            this.show = true;
         }
-        this.dataList = res.data.data.records ? res.data.data.records : [];
-        this.page.total = res.data.data.total;
-        if (this.page.total) {
-          this.option.height = window.innerHeight - 210;
+        if (this.$route.query.id) {
+            setTimeout(() => {
+                this.editOpen({id: this.$route.query.id}, 1);
+            }, 100);
+        }
+        if (this.$route.query.check) {
+            this.detailData = {
+                id: this.$route.query.check.billId
+            };
+            this.show = false;
+            this.$store.commit("IN_XS_STATUS");
+        }
+        if (this.$route.query.params) {
+            this.detailData = {
+                id: this.$route.query.params
+            };
+            this.show = false;
+            this.$store.commit("IN_XS_STATUS");
         }
-      });
-    },
-    refreshChange() {
-      this.onLoad(this.page, this.search);
-    },
-    newAdd(type) {
-      this.detailData = {
-        pageType: type
-      };
-      this.show = false;
-      this.$store.commit("IN_XS_STATUS");
-    },
-    copyDoc() {
-      this.selectionList.forEach(e => {
-        this.detailData = {
-          id: e.id,
-          status: "copy"
-        };
-        this.show = false;
-        this.$store.commit("IN_XS_STATUS");
-      });
-    },
-    copyOrder(id) {
-      this.show = true;
-      this.detailData = {
-        id: id,
-        status: "copy"
-      };
-      this.$nextTick(() => {
-        this.show = false;
-        this.$store.commit("IN_XS_STATUS");
-      });
-    },
-    goBack() {
-      this.detailData = this.$options.data().detailData;
-      this.show = true;
-      this.onLoad(this.page, this.search);
-      this.$store.commit("OUT_XS_STATUS");
     },
-    summaryMethod({ columns, data }) {
-      const sums = [];
-      if (columns.length > 0) {
-        columns.forEach((item, index) => {
-          sums[0] = "合计";
-          if (
-            item.property == "minOrder" ||
-            item.property == "predictOceanFreight" ||
-            item.property == "referenceOceanFreight" ||
-            item.property == "oceanFreight" ||
-            item.property == "orderQuantity" ||
-            item.property == "actualQuantity" ||
-            item.property == "grossProfit" ||
-            item.property == "amount" ||
-            item.property == "purchaseAmount"
-          ) {
-            let qtySum = 0;
-            let instoreSum = 0;
-            let totalSum = 0;
-            let oceanFreightSum = 0;
-            let orderQuantitySum = 0;
-            let actualQuantitySum = 0;
-            let amountSum = 0;
-            let purchaseAmountSum = 0;
-            data.forEach(e => {
-              qtySum = _.add(qtySum, Number(e.minOrder));
-              instoreSum = _.add(instoreSum, Number(e.predictOceanFreight));
-              totalSum = _.add(totalSum, Number(e.referenceOceanFreight));
-              oceanFreightSum = _.add(oceanFreightSum, Number(e.oceanFreight));
-              orderQuantitySum = _.add(
-                orderQuantitySum,
-                Number(e.orderQuantity)
-              );
-              actualQuantitySum = _.add(
-                actualQuantitySum,
-                Number(e.actualQuantity)
-              );
-              amountSum = _.add(amountSum, Number(e.amount));
-              purchaseAmountSum = _.add(
-                purchaseAmountSum,
-                Number(e.purchaseAmount)
-              );
+    methods: {
+        searchCriteriaSwitch(type) {
+            if (type) {
+                this.option.height = this.option.height - 191;
+            } else {
+                this.option.height = this.option.height + 191;
+            }
+            this.$refs.crud.getTableHeight();
+        },
+        cellStyle() {
+            return "padding:0;height:40px;";
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        expandChange(row) {
+            if (!row.itemData) {
+                getGoodsInfo({id: row.id, tradeType: "CK"})
+                    .then(res => {
+                        this.dataList[row.$index].itemData = res.data.data;
+                    })
+                    .finally(() => {
+                        this.dataList[row.$index].itemLoading = false;
+                    });
+            }
+        },
+        procurementProgress(row, index) {
+            listPurchaseStatus(row.id).then(res => {
+                this.purchaseStatusList = res.data.data
+                this.dialogVisible = true
+            })
+        },
+        //删除列表后面的删除按钮触发触发(row, index, done)
+        rowDel(row, index, done) {
+            this.$confirm("确定删除数据?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                remove(row.id).then(res => {
+                    if (res.data.code == 200) {
+                        this.$message({
+                            type: "success",
+                            message: "删除成功!"
+                        });
+                        this.onLoad(this.page, this.search);
+                    }
+                });
             });
-            //数量总计
-            if (item.property == "minOrder") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+        },
+        //查看跳转页面
+        editOpen(row, status) {
+            if (this.$route.query.id) {
+                this.$router.$avueRouter.closeTag(this.$route.fullPath);
+                this.$router.push({
+                    path: "/exportTrade/salesContract/index"
+                });
             }
-            //入库金额总计
-            if (item.property == "predictOceanFreight") {
-              sums[index] = micrometerFormat(instoreSum);
+            this.detailData = {
+                id: row.id,
+                status: status
+            };
+            this.show = false;
+            this.$store.commit("IN_XS_STATUS");
+        },
+        //点击搜索按钮触发
+        searchChange(params, done) {
+            if (params.businesDate) {
+                params.orderStartDate = params.businesDate[0];
+                params.orderEndDate = params.businesDate[1];
             }
-            //金额总计
-            if (item.property == "referenceOceanFreight") {
-              sums[index] = micrometerFormat(totalSum);
+            if (params.plannedDeliveryDate) {
+                params.plannedDeliveryStart = params.plannedDeliveryDate[0];
+                params.plannedDeliveryEnd = params.plannedDeliveryDate[1];
             }
-            //实际海运费
-            if (item.property == "oceanFreight") {
-              sums[index] = micrometerFormat(oceanFreightSum);
+            if (params.createTime) {
+                params.createTimeStart = params.createTime[0];
+                params.createTimeEnd = params.createTime[1];
             }
-            if (item.property == "orderQuantity") {
-              sums[index] = orderQuantitySum
-                ? orderQuantitySum.toFixed(2)
-                : "0.00";
+            delete params.businesDate;
+            delete params.plannedDeliveryDate;
+            delete params.createTime;
+            this.page.currentPage = 1;
+            this.onLoad(this.page, params);
+            done();
+        },
+        currentChange(val) {
+            this.page.currentPage = val;
+        },
+        sizeChange(val) {
+            this.page.currentPage = 1;
+            this.page.pageSize = val;
+        },
+        onLoad(page, params) {
+            if (this.search.businesDate && this.search.businesDate.length > 0) {
+                params = {
+                    ...params,
+                    orderStartDate: this.search.businesDate[0],
+                    orderEndDate: this.search.businesDate[1]
+                };
+                delete params.businesDate;
             }
-            if (item.property == "actualQuantity") {
-              sums[index] = actualQuantitySum
-                ? actualQuantitySum.toFixed(2)
-                : "0.00";
+            this.dataList.forEach(item => {
+                this.$refs.crud.toggleRowExpansion(item, false);
+            });
+            getList(page.currentPage, page.pageSize, params).then(res => {
+                if (res.data.data.records) {
+                    res.data.data.records.forEach(e => {
+                        e.itemLoading = true;
+                    });
+                }
+                this.dataList = res.data.data.records ? res.data.data.records : [];
+                this.page.total = res.data.data.total;
+                if (this.page.total) {
+                    this.option.height = window.innerHeight - 210;
+                }
+            });
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.search);
+        },
+        newAdd(type) {
+            this.detailData = {
+                pageType: type
+            };
+            this.show = false;
+            this.$store.commit("IN_XS_STATUS");
+        },
+        copyDoc() {
+            this.selectionList.forEach(e => {
+                this.detailData = {
+                    id: e.id,
+                    status: "copy"
+                };
+                this.show = false;
+                this.$store.commit("IN_XS_STATUS");
+            });
+        },
+        copyOrder(id) {
+            this.show = true;
+            this.detailData = {
+                id: id,
+                status: "copy"
+            };
+            this.$nextTick(() => {
+                this.show = false;
+                this.$store.commit("IN_XS_STATUS");
+            });
+        },
+        goBack() {
+            this.detailData = this.$options.data().detailData;
+            this.show = true;
+            this.onLoad(this.page, this.search);
+            this.$store.commit("OUT_XS_STATUS");
+        },
+        summaryMethod({columns, data}) {
+            const sums = [];
+            if (columns.length > 0) {
+                columns.forEach((item, index) => {
+                    sums[0] = "合计";
+                    if (
+                        item.property == "minOrder" ||
+                        item.property == "predictOceanFreight" ||
+                        item.property == "referenceOceanFreight" ||
+                        item.property == "oceanFreight" ||
+                        item.property == "orderQuantity" ||
+                        item.property == "actualQuantity" ||
+                        item.property == "grossProfit" ||
+                        item.property == "amount" ||
+                        item.property == "purchaseAmount"
+                    ) {
+                        let qtySum = 0;
+                        let instoreSum = 0;
+                        let totalSum = 0;
+                        let oceanFreightSum = 0;
+                        let orderQuantitySum = 0;
+                        let actualQuantitySum = 0;
+                        let amountSum = 0;
+                        let purchaseAmountSum = 0;
+                        data.forEach(e => {
+                            qtySum = _.add(qtySum, Number(e.minOrder));
+                            instoreSum = _.add(instoreSum, Number(e.predictOceanFreight));
+                            totalSum = _.add(totalSum, Number(e.referenceOceanFreight));
+                            oceanFreightSum = _.add(oceanFreightSum, Number(e.oceanFreight));
+                            orderQuantitySum = _.add(
+                                orderQuantitySum,
+                                Number(e.orderQuantity)
+                            );
+                            actualQuantitySum = _.add(
+                                actualQuantitySum,
+                                Number(e.actualQuantity)
+                            );
+                            amountSum = _.add(amountSum, Number(e.amount));
+                            purchaseAmountSum = _.add(
+                                purchaseAmountSum,
+                                Number(e.purchaseAmount)
+                            );
+                        });
+                        //数量总计
+                        if (item.property == "minOrder") {
+                            sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+                        }
+                        //入库金额总计
+                        if (item.property == "predictOceanFreight") {
+                            sums[index] = micrometerFormat(instoreSum);
+                        }
+                        //金额总计
+                        if (item.property == "referenceOceanFreight") {
+                            sums[index] = micrometerFormat(totalSum);
+                        }
+                        //实际海运费
+                        if (item.property == "oceanFreight") {
+                            sums[index] = micrometerFormat(oceanFreightSum);
+                        }
+                        if (item.property == "orderQuantity") {
+                            sums[index] = orderQuantitySum
+                                ? orderQuantitySum.toFixed(2)
+                                : "0.00";
+                        }
+                        if (item.property == "actualQuantity") {
+                            sums[index] = actualQuantitySum
+                                ? actualQuantitySum.toFixed(2)
+                                : "0.00";
+                        }
+                        if (item.property == "amount") {
+                            sums[index] = micrometerFormat(amountSum);
+                        }
+                        if (item.property == "purchaseAmount") {
+                            sums[index] = micrometerFormat(purchaseAmountSum);
+                        }
+                    }
+                });
             }
-            if (item.property == "amount") {
-              sums[index] = micrometerFormat(amountSum);
+            return sums;
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(4),
+                this.option
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
             }
-            if (item.property == "purchaseAmount") {
-              sums[index] = micrometerFormat(purchaseAmountSum);
+        },
+        async resetColumn() {
+            this.option = option;
+            const inSave = await this.delColumnData(this.getColumnName(4), option);
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("重置成功");
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
             }
-          }
-        });
-      }
-      return sums;
-    },
-    async saveColumn() {
-      const inSave = await this.saveColumnData(
-        this.getColumnName(4),
-        this.option
-      );
-      if (inSave) {
-        this.$nextTick(() => {
-          this.$refs.crud.doLayout();
-        });
-        this.$message.success("保存成功");
-        //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
-      }
+        }
     },
-    async resetColumn() {
-      this.option = option;
-      const inSave = await this.delColumnData(this.getColumnName(4), option);
-      if (inSave) {
-        this.$nextTick(() => {
-          this.$refs.crud.doLayout();
-        });
-        this.$message.success("重置成功");
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
-      }
-    }
-  },
-  watch: {
-    option: function() {
-      this.search.businesDate = defaultDate();
+    watch: {
+        option: function () {
+            this.search.businesDate = defaultDate();
+        }
     }
-  }
 };
 </script>
 
 <style scoped>
 ::v-deep .select-component {
-  display: flex;
+    display: flex;
 }
+
 .page-crad ::v-deep .basic-container__card {
-  height: 94.2vh;
+    height: 94.2vh;
 }
+
 .itemTable ::v-deep .el-table {
-  margin-left: 50px;
-  width: 100%;
+    margin-left: 50px;
+    width: 100%;
 }
 </style>

+ 12 - 0
src/views/maintenance/priceManagement/configuration/mainList.json

@@ -87,6 +87,18 @@
       "overHidden": true
     },
     {
+      "label": "采购返利价",
+      "prop": "purchaseRebatePrice",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "type":"number",
+      "precision":2,
+      "controls":false,
+      "cell": true,
+      "overHidden": true
+    },
+    {
       "label": "运费价格",
       "prop": "freightFees",
       "search": false,

+ 17 - 0
src/views/maintenance/salesPolicy/configuration/BuyFree.json

@@ -149,6 +149,23 @@
         }
       ]
     },{
+      "label": "真实特价",
+      "prop": "realSpecialOffer",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "overHidden": true,
+      "type":"number",
+      "precision":2,
+      "controls":false,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
       "label": "体积",
       "prop": "cntrVolumn",
       "index": 6,

+ 17 - 0
src/views/maintenance/salesPolicy/configuration/customerContact.json

@@ -133,6 +133,23 @@
           "trigger": "blur"
         }
       ]
+    },{
+      "label": "真实特价",
+      "prop": "realSpecialOffer",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "overHidden": true,
+      "type":"number",
+      "precision":2,
+      "controls":false,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
     },
     {
       "label": "体积",