Browse Source

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 years ago
parent
commit
78bfa75205
36 changed files with 456 additions and 175 deletions
  1. 2 1
      src/api/basicData/invoice.js
  2. 6 1
      src/api/basicData/portinformation.js
  3. 2 1
      src/api/basicData/purchaseInquiry.js
  4. 2 1
      src/api/basicData/salesContract.js
  5. 2 1
      src/api/basicData/shippingInquiry.js
  6. 2 1
      src/api/exportTrade/purchaseContract.js
  7. 2 1
      src/api/exportTrade/receipt.js
  8. 7 5
      src/components/price-Library/main.vue
  9. 6 0
      src/page/index/tags.vue
  10. 2 0
      src/store/getters.js
  11. 30 8
      src/store/modules/ifdetail.js
  12. 1 1
      src/views/basicData/container/index.vue
  13. 1 1
      src/views/basicData/container/type.vue
  14. 3 0
      src/views/basicData/customerInformation/index.vue
  15. 3 0
      src/views/basicData/customerManagement/supplierMaterial/index.vue
  16. 1 1
      src/views/basicData/portinformation/index.vue
  17. 1 1
      src/views/basicData/portinformation/type.vue
  18. 43 39
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  19. 44 6
      src/views/businessManagement/receipt/detailsPageEdit.vue
  20. 6 2
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  21. 32 11
      src/views/exportTrade/customerInquiry/detailsPage.vue
  22. 23 2
      src/views/exportTrade/customerInquiry/index.vue
  23. 20 9
      src/views/exportTrade/invoice/detailsPage.vue
  24. 2 2
      src/views/exportTrade/invoice/index.vue
  25. 20 9
      src/views/exportTrade/purchaseContract/detailsPage.vue
  26. 2 2
      src/views/exportTrade/purchaseContract/index.vue
  27. 20 9
      src/views/exportTrade/purchaseInquiry/detailsPage.vue
  28. 2 2
      src/views/exportTrade/purchaseInquiry/index.vue
  29. 20 9
      src/views/exportTrade/receipt/detailsPage.vue
  30. 2 2
      src/views/exportTrade/receipt/index.vue
  31. 44 10
      src/views/exportTrade/salesContract/detailsPage.vue
  32. 24 2
      src/views/exportTrade/salesContract/index.vue
  33. 20 9
      src/views/exportTrade/shippingInquiry/detailsPage.vue
  34. 2 2
      src/views/exportTrade/shippingInquiry/index.vue
  35. 2 2
      src/views/maintenance/priceLibrary/index.vue
  36. 55 22
      src/views/statisticAnalysis/salesProfit/index.vue

+ 2 - 1
src/api/basicData/invoice.js

@@ -46,11 +46,12 @@ export function remove(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size,goodsTypeId) => {
+export const getGoods = (current, size,goodsTypeId, params) => {
   return request({
       url: '/api//blade-client/goodsdesc/selectGoods',
       method: 'get',
       params: {
+        ...params,
           current,
           size,
           goodsTypeId,

+ 6 - 1
src/api/basicData/portinformation.js

@@ -98,4 +98,9 @@ export const getTypeTree = () => {
   })
 }
 
-
+export const getAllBoxs = () => {
+  return request({
+    url: '/api/blade-client/container/listMessage',
+    method: 'get',
+  })
+}

+ 2 - 1
src/api/basicData/purchaseInquiry.js

@@ -53,11 +53,12 @@ export function remove(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size,goodsTypeId) => {
+export const getGoods = (current, size,goodsTypeId, params) => {
   return request({
       url: '/api//blade-client/goodsdesc/selectGoods',
       method: 'get',
       params: {
+        ...params,
           current,
           size,
           goodsTypeId,

+ 2 - 1
src/api/basicData/salesContract.js

@@ -56,11 +56,12 @@ export function deliverGoods(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size, goodsTypeId) => {
+export const getGoods = (current, size, goodsTypeId, params) => {
   return request({
     url: '/api//blade-client/goodsdesc/selectGoods',
     method: 'get',
     params: {
+      ...params,
       current,
       size,
       goodsTypeId,

+ 2 - 1
src/api/basicData/shippingInquiry.js

@@ -54,11 +54,12 @@ export function remove(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size,goodsTypeId) => {
+export const getGoods = (current, size,goodsTypeId, params) => {
   return request({
       url: '/api//blade-client/goodsdesc/selectGoods',
       method: 'get',
       params: {
+        ...params,
           current,
           size,
           goodsTypeId,

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

@@ -53,11 +53,12 @@ export function deliverGoods(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size, goodsTypeId) => {
+export const getGoods = (current, size, goodsTypeId, params) => {
   return request({
     url: '/api//blade-client/goodsdesc/selectGoods',
     method: 'get',
     params: {
+      ...params,
       current,
       size,
       goodsTypeId,

+ 2 - 1
src/api/exportTrade/receipt.js

@@ -46,11 +46,12 @@ export function remove(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size,goodsTypeId) => {
+export const getGoods = (current, size,goodsTypeId, params) => {
   return request({
       url: '/api/blade-client/goodsdesc/selectGoods',
       method: 'get',
       params: {
+        ...params,
           current,
           size,
           goodsTypeId,

+ 7 - 5
src/components/price-Library/main.vue

@@ -108,9 +108,9 @@ export default {
         }
       }
       this.visible = false;
-      if(this.partType){
-        this.$emit("librayToPart", this.selectionList,this.partreData);
-      }else{
+      if (this.partType) {
+        this.$emit("librayToPart", this.selectionList, this.partreData);
+      } else {
         this.$emit("importLibray", this.selectionList);
       }
     },
@@ -123,17 +123,19 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
+      this.search = this.deepClone(params);
       this.getList(this.page, params);
       done();
     },
     getList(page, params) {
-      const data = {
+      let data = {
         ...params,
         billType: "CG",
         statusTime: dateFormat(new Date(), "yyyy-MM-dd")
       };
+      let obj = Object.assign(data, this.search);
       this.loading = true;
-      getPricebank(page.currentPage, page.pageSize, data)
+      getPricebank(page.currentPage, page.pageSize, obj)
         .then(res => {
           this.data = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;

+ 6 - 0
src/page/index/tags.vue

@@ -303,6 +303,12 @@ export default {
     menuTag(value, action) {
       if (action === "remove") {
         let { tag, key } = this.findTag(value);
+        if (tag.label == "报价(E)") {
+          this.$store.commit("OUT_BJ_STATUS");
+        }
+        if (tag.label == "销售(E)") {
+          this.$store.commit("OUT_XS_STATUS");
+        }
         if (tag.label == "发货(E)") {
           this.$store.commit("OUT_OUT_DETAIL");
         }

+ 2 - 0
src/store/getters.js

@@ -44,5 +44,7 @@ const getters = {
   incomeStatus: state => state.ifdetail.incomeStatus,
   entranceCgStatus: state => state.ifdetail.entranceCgStatus,
   entranceXsStatus: state => state.ifdetail.entranceXsStatus,
+  xsStatus: state => state.ifdetail.xsStatus,
+  bjStatus: state => state.ifdetail.bjStatus,
 }
 export default getters

+ 30 - 8
src/store/modules/ifdetail.js

@@ -7,17 +7,19 @@ const ifdetail = {
     outStatus: false, //出口发货单
     outtaskStatus: false, //出口收货单
     pqStatus: false, //付款
-    paySettle:false, //付款结算
-    receiptSettle:false, //收款结算
-    mainItemStatus:false, //主营业务明细
-    settleStatus:false,//结算明细
+    paySettle: false, //付款结算
+    receiptSettle: false, //收款结算
+    mainItemStatus: false, //主营业务明细
+    settleStatus: false, //结算明细
     domSaleStatus: false, // 内贸销售
     domStockDetail: false, // 国内库存账
     domPurStatus: false, // 内贸采购
-    outputStatus:false,//销项发票
-    incomeStatus:false,//进项发票
-    entranceCgStatus:false,//进口采购
-    entranceXsStatus:false,//进口销售
+    outputStatus: false, //销项发票
+    incomeStatus: false, //进项发票
+    entranceCgStatus: false, //进口采购
+    entranceXsStatus: false, //进口销售,
+    xsStatus: false, //出口销售
+    bjStatus: false //出口报价
   },
   actions: {},
   mutations: {
@@ -66,6 +68,20 @@ const ifdetail = {
     OUT_OUT_DETAIL(state) {
       state.outStatus = false;
     },
+    IN_XS_STATUS(state) {
+      state.xsStatus = true;
+    },
+    //退出详情页
+    OUT_XS_STATUS(state) {
+      state.xsStatus = false;
+    },
+    IN_BJ_STATUS(state) {
+      state.bjStatus = true;
+    },
+    //退出详情页
+    OUT_BJ_STATUS(state) {
+      state.bjStatus = false;
+    },
     //出口状态
     // 进入详情页
     REC_IN_DETAIL(state) {
@@ -193,6 +209,12 @@ const ifdetail = {
       if (tag.label == '收货(E)') {
         state.outtaskStatus = true;
       }
+      if (tag.label == '销售(E)') {
+        state.xsStatus = true;
+      }
+      if (tag.label == '报价(E)') {
+        state.bjStatus = true;
+      }
       if (tag.label == '付费申请') {
         state.pqStatus = true;
       }

+ 1 - 1
src/views/basicData/container/index.vue

@@ -128,7 +128,7 @@
       },
       getList(page, params = {}) {
         this.loading = true
-        getList(page.currentPage, page.pageSize, params, this.treeDeptId).then(res => {
+        getList(page.currentPage, page.pageSize,Object.assign(params, this.search), this.treeDeptId).then(res => {
           this.data = res.data.data.records
           this.page.total = res.data.data.total
           this.loading = false

+ 1 - 1
src/views/basicData/container/type.vue

@@ -66,7 +66,7 @@
           size:this.page.pageSize,
           parentId:0
         };
-        getTypeList(param).then(res => {
+        getTypeList(Object.assign(param, this.search)).then(res => {
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
           this.loading=false;

+ 3 - 0
src/views/basicData/customerInformation/index.vue

@@ -78,6 +78,9 @@
           <template slot="adminProfiles" slot-scope="{ row }">
             <span>{{ row.adminProfilesName | adminProfileFilter }}</span>
           </template>
+          <template slot="belongtocompany" slot-scope="{ row }">
+            <span>{{ row.belongCompany }}</span>
+          </template>
         </avue-crud>
         <report-dialog
           :switchDialog="switchDialog"

+ 3 - 0
src/views/basicData/customerManagement/supplierMaterial/index.vue

@@ -78,6 +78,9 @@
           <template slot="adminProfiles" slot-scope="{ row }">
             <span>{{ row.adminProfilesName | adminProfileFilter }}</span>
           </template>
+          <template slot="belongtocompany" slot-scope="{ row }">
+            <span>{{ row.belongCompany }}</span>
+          </template>
         </avue-crud>
         <report-dialog
           :switchDialog="switchDialog"

+ 1 - 1
src/views/basicData/portinformation/index.vue

@@ -129,7 +129,7 @@
       },
       getList(page, params = {}) {
         this.loading = true
-        getList(page.currentPage, page.pageSize, params, this.treeDeptId).then(res => {
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.search), this.treeDeptId).then(res => {
           this.data = res.data.data.records
           this.page.total = res.data.data.total
           this.loading = false

+ 1 - 1
src/views/basicData/portinformation/type.vue

@@ -67,7 +67,7 @@
           size:this.page.pageSize,
           parentId:0
         };
-        getTypeList(param).then(res => {
+        getTypeList(Object.assign(param, this.search)).then(res => {
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
           this.loading=false;

+ 43 - 39
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -167,14 +167,23 @@
               ></el-input>
               <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
             </template>
-            <template slot="price" slot-scope="{ row }">
-              <el-input
+            <template slot="purchaseAmount" slot-scope="{ row }">
+              <el-select
                 v-if="row.$cellEdit"
-                v-model.trim="row.price"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                size="small"
-                @input="changeContractAmt(row)"
-              ></el-input>
-              <span v-else>{{ row.price }}</span>
+                v-model="row.purchaseAmount"
+                @focus="changeContractAmt(row)"
+                allow-create
+                filterable
+                v-input-limit="2"
+                default-first-option
+              >
+                <el-option
+                  v-for="(item, index) in purchasePriceOption"
+                  :key="index"
+                  :label="item.purchasePrice"
+                  :value="item.purchasePrice"></el-option>
+              </el-select>
+              <span v-else>{{ row.purchaseAmount | decimalFormat }}</span>
             </template>
             <template slot="amount" slot-scope="{ row }">
               <span>{{ row.amount | decimalFormat }}</span>
@@ -185,24 +194,6 @@
             <template slot="storageQuantity" slot-scope="{ row }">
               <span>{{ row.storageQuantity | IntegerFormat }}</span>
             </template>
-<!--            <template slot="storageQuantity" slot-scope="{ row }">-->
-<!--              <el-input-->
-<!--                v-if="row.$cellEdit"-->
-<!--                v-model.trim="row.storageQuantity"-->
-<!--                size="small"-->
-<!--                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
-<!--              ></el-input>-->
-<!--              <span v-else>{{ row.storageQuantity }}</span>-->
-<!--            </template>-->
-<!--            <template slot="actualQuantity" slot-scope="{ row }">-->
-<!--              <el-input-->
-<!--                v-if="row.$cellEdit"-->
-<!--                v-model.trim="row.actualQuantity"-->
-<!--                size="small"-->
-<!--                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
-<!--              ></el-input>-->
-<!--              <span v-else>{{ row.actualQuantity }}</span>-->
-<!--            </template>-->
             <template slot="code" slot-scope="{row,index}">
               <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
               <span>{{ row.code }}</span>
@@ -515,6 +506,7 @@ import reportDialog from "@/components/report-dialog/main";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
 import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
+import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees";
 
 export default {
   name: "detailsPage",
@@ -608,7 +600,6 @@ export default {
         treeLoad: function (node, resolve) {
           const parentId = (node.level === 0) ? 0 : node.data.id;
           getDeptLazyTreeS(parentId).then(res => {
-            console.log(res.data.data)
             resolve(res.data.data.map(item => {
               return {
                 ...item,
@@ -822,6 +813,7 @@ export default {
       feesOption: [],
       applyPaymentList: [],
       messageVisble: false,
+      purchasePriceOption: [],
     }
   },
   mounted() {
@@ -844,7 +836,6 @@ export default {
   async created() {
     this.rowHeight = (window.innerHeight - 130) + 'px'
     this.customerContact = customerContact
-    console.log(this.customerContact)
     // this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(19), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
@@ -1061,11 +1052,9 @@ export default {
     },
     //点击行可编辑
     handleRowClick(row, event, column) {
-      console.log(row.$index)
     },
     //商品编辑
     rowCell(row, index) {
-      console.log(row)
       if (row.$cellEdit) {
         if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
           return this.$message.error('订货数量不能小于发货数量')
@@ -1075,7 +1064,6 @@ export default {
     },
     //费用编辑
     rowCellTwo(row, index) {
-      console.log(row)
       this.$refs.crudProject.rowCell(row, index)
     },
     //商品选中触发
@@ -1098,14 +1086,12 @@ export default {
     choice(row) {
       this.dialogCost = !this.dialogCost
       this.choiceData = true
-      console.log(row)
       this.choiceIndex = row.$index
     },
     //点击商品明细选择触发
     commodityChoice(row) {
       this.dialogVisible = !this.dialogVisible
       this.commodityData = true
-      console.log(row)
       this.choiceIndexT = row.$index
     },
     //导入商品触发
@@ -1120,6 +1106,13 @@ export default {
         this.contactsData[this.choiceIndexT].orderQuantity = 0
         this.contactsData[this.choiceIndexT].price = 0
         this.contactsData[this.choiceIndexT].amount = 0
+        getPurchasePrice({code: this.contactsData[this.choiceIndexT].code}).then(res => {
+          if (res.data.data.length > 0) {
+            this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', res.data.data[0].purchasePrice)
+          } else {
+            this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', '0')
+          }
+        })
         selectGoodsNum({
           goodsId: this.tableData[0].id,
           itemType: this.tableData[0].typeno
@@ -1145,7 +1138,6 @@ export default {
       // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
       if (this.tableDataCost.length > 0) {
         for (let item in this.tableDataCost) {
-          console.log(this.tableDataCost[item])
           this.tableDataCost[item].itemId = this.tableDataCost[item].id
           this.tableDataCost[item].feeName = this.tableDataCost[item].cname
           this.tableDataCost[item].sort = this.maxFeeNum + 1
@@ -1162,6 +1154,13 @@ export default {
     importGoods() {
       if (this.goodsListSave.length > 0) {
         for (let item in this.goodsListSave) {
+          getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
+            if (res.data.data.length > 0) {
+              this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
+            } else {
+              this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
+            }
+          })
           selectGoodsNum({
             goodsId: this.goodsListSave[item].id,
             itemType: this.goodsListSave[item].typeno
@@ -1185,6 +1184,13 @@ export default {
         }
       } else {
         for (let item in this.tableData) {
+          getPurchasePrice({code: this.tableData[item].code}).then(res => {
+            if (res.data.data.length > 0) {
+              this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
+            } else {
+              this.$set(this.tableData[item], 'purchaseAmount', '0')
+            }
+          })
           selectGoodsNum({
             goodsId: this.tableData[item].id,
             itemType: this.tableData[item].typeno
@@ -1222,12 +1228,10 @@ export default {
     },
     //选中触发
     selectionChange(list) {
-      console.log(list);
       this.tableData = list
     },
     //费用选中触发
     selectionChangeCost(list) {
-      console.log(list);
       this.tableDataCost = list
     },
     //导入页左商品类型查询
@@ -1256,8 +1260,6 @@ export default {
     },
     //新增商品信息保存触发
     rowSave(row, done, loading) {
-      console.log(row)
-      console.log(this.contactsData)
       // this.contactsData.push(row)
       done()
     },
@@ -1331,7 +1333,6 @@ export default {
         feesTypeId: this.treeDeptIdCost
       })
       customerList(queryParams).then(res => {
-        console.log(res)
         const data = res.data.data;
         this.pageCost.total = data.total;
         this.dataCost = data.records;
@@ -1366,9 +1367,12 @@ export default {
 
     // 计算费用
     changeContractAmt(row) {
+      getPurchasePrice({code: row.code}).then(res => {
+        this.purchasePriceOption = res.data.data
+      })
       let orderQuantity = 0;
       let purchaseAmount = 0;
-      if (row.price) {
+      if (row.purchaseAmount) {
         purchaseAmount = row.purchaseAmount;
       }
       if (row.orderQuantity) {

+ 44 - 6
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -154,6 +154,12 @@
             <template slot="purchaseQuantity" slot-scope="{ row }">
               <span>{{ row.purchaseQuantity | IntegerFormat }}</span>
             </template>
+            <template slot="purchaseAmount" slot-scope="{ row }">
+              <span>{{ row.purchaseAmount | decimalFormat }}</span>
+            </template>
+            <template slot="deliveryAmount" slot-scope="{ row }">
+              <span>{{ row.deliveryAmount | decimalFormat }}</span>
+            </template>
             <template slot="menuLeft" slot-scope="{size}">
               <el-button type="primary"
                          icon="el-icon-plus"
@@ -305,6 +311,8 @@ import {
   micrometerFormat,
   IntegerFormat
 } from "@/util/validate";
+import {detail as GYSDetail} from "@/api/basicData/customerInformation";
+import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees";
 
 export default {
   name: "detailsPage",
@@ -624,6 +632,7 @@ export default {
       // 收货禁用
       receiveDisabled: false,
       messageVisble:false,
+      GYSInfo: [], //供应商发货方信息
     }
   },
   mounted() {
@@ -704,15 +713,17 @@ export default {
       this.$set(this.form, 'deliveryAmount', 0)
       this.$set(this.form, 'totalQuantity', 0)
       this.$set(this.form, 'purchaseAmount', 0)
+      this.returnBack({id: this.form.corpId})
       this.contactsData.forEach(item => {
         this.$set(item, 'specificationAndModel', item.itemType)
         this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
         this.$set(item, "inventoryNumber", item.storageQuantity)
         this.$set(item, "srcId", item.id)
-        this.$set(item, "deliveryAmount", item.amount)
-        this.$set(item, "purchaseAmount", item.price)
+        // this.$set(item, "deliveryAmount", item.amount)
+        this.$set(item, "purchaseAmount", item.purchaseAmount)
         this.$set(item, "purchaseQuantity", Number(item.orderQuantity))
         this.$set(item, "actualQuantity", (Number(item.orderQuantity) - Number(item.actualQuantity)))
+        this.actualQuantityChange(item)
         // 入库数量和入库金额的比例
         this.$set(item, 'scale', Number(item.deliveryAmount / item.actualQuantity))
         this.form.deliveryAmount = Number(this.form.deliveryAmount) + Number(item.deliveryAmount)
@@ -825,11 +836,11 @@ export default {
     actualQuantityChange(row) {
       if (Number(row.actualQuantity) > Number(row.purchaseQuantity)) {
         this.$message.error('入库数量不能超过采购数量')
-        row.actualQuantity = 0
+        row.actualQuantity = '0.00'
+        row.deliveryAmount = '0.00'
+      } else {
+        row.deliveryAmount = Number(row.actualQuantity) * Number(row.purchaseAmount)
       }
-      // if (row.scale) {
-      //   row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
-      // }
     },
     // 类别变换时触发
     warehouseTreeChange(id) {
@@ -896,6 +907,13 @@ export default {
         this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
         this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].typeno
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
+        getPurchasePrice({code: this.contactsData[this.choiceIndexT].code}).then(res => {
+          if (res.data.data.length > 0) {
+            this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', res.data.data[0].purchasePrice)
+          } else {
+            this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', '0')
+          }
+        })
         selectGoodsNum({
           goodsId: this.tableData[0].id,
           itemType: this.tableData[0].typeno
@@ -940,6 +958,13 @@ export default {
       // this.contactsData = this.contactsData.concat(this.tableData)
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
+          getPurchasePrice({code: this.tableData[item].code}).then(res => {
+            if (res.data.data.length > 0) {
+              this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
+            } else {
+              this.$set(this.tableData[item], 'purchaseAmount', '0')
+            }
+          })
           selectGoodsNum({
             goodsId: this.tableData[item].id,
             itemType: this.tableData[item].typeno
@@ -1356,6 +1381,19 @@ export default {
       })
     },
     returnBack(data) {
+      GYSDetail(data.id).then(res => {
+        if (res.data.data.corpsAddrList.length > 0) {
+          this.GYSInfo = res.data.data.corpsAddrList
+          this.$set(this.form, 'arrivalAddress', this.GYSInfo[0].addr);
+          this.$set(this.form, 'arrivalContact', this.GYSInfo[0].attn);
+          this.$set(this.form, 'arrivalTel', this.GYSInfo[0].tel);
+        } else {
+          this.GYSInfo = []
+          this.$set(this.form, 'arrivalAddress', null);
+          this.$set(this.form, 'arrivalContact', null);
+          this.$set(this.form, 'arrivalTel', null);
+        }
+      })
       if (data.belongtocompany) {
         // this.form.salesCompany = data.belongtocompany
       }

+ 6 - 2
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2172,10 +2172,14 @@ export default {
         this.$set(this.form, 'chargeMember', arr[0])
       }
       khDetail(data.id).then(res => {
-        if (res.data.data.corpsAttnList) {
-          this.khInfoList = res.data.data.corpsAttnList
+        if (res.data.data.corpsAttnList.length > 0) {
+          this.khInfoList = res.data.data.corpsAttnList;
           this.$set(this.form, 'corpAttn', res.data.data.corpsAttnList[0].cname);
           this.$set(this.form, 'corpTel', res.data.data.corpsAttnList[0].tel);
+        } else {
+          this.khInfoList = [];
+          this.$set(this.form, 'corpAttn', null);
+          this.$set(this.form, 'corpTel', null);
         }
       })
       if (data.belongtocompany) {

+ 32 - 11
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -158,12 +158,30 @@
               @change="exchangeRateChange"
             />
           </template>
+          <template slot="boxPile">
+            <el-select
+              size="small"
+              v-model="form.boxPile"
+              placeholder="请选择"
+              clearable
+              filterable
+              :disabled="detailData.status == 1"
+            >
+              <el-option
+                v-for="item in allBoxs"
+                :key="item.id"
+                :label="item.name"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
+          </template>
           <template slot="boxNumber">
             <el-input
               size="small"
               v-model="form.boxNumber"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              placeholder="请输入 起订量"
+              placeholder="请输入 量"
               :disabled="detailData.status == 1"
             />
           </template>
@@ -470,7 +488,7 @@
       />
       <containerTitle title="合同附件"></containerTitle>
       <c-upload
-        typeUpload='CK'
+        typeUpload="CK"
         :data="orderFilesList"
         :disabled="detailData.status == 1"
         :enumerationValue="76"
@@ -511,6 +529,7 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
               @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
@@ -572,6 +591,7 @@ import {
   saveSell,
   getPricedetail
 } from "@/api/basicData/customerInquiry";
+import { getAllBoxs } from "@/api/basicData/portinformation";
 import { getCorpsattn } from "@/api/basicData/customerInformation";
 import reportDialog from "@/components/report-dialog/main";
 import priceLibrary from "@/components/price-Library/main";
@@ -807,12 +827,6 @@ export default {
           {
             label: "箱型",
             prop: "boxPile",
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            },
             span: 8
           },
           {
@@ -937,7 +951,9 @@ export default {
       priceTermsList: [],
       paymentTermList: [],
       currencyList: [],
-      corpsattns: []
+      corpsattns: [],
+      allBoxs: [],
+      search: {}
     };
   },
   props: {
@@ -999,6 +1015,9 @@ export default {
       this.findObject(this.option.column, "portOfDestination").dicData =
         res.data;
     });
+    getAllBoxs().then(res => {
+      this.allBoxs = res.data.data;
+    });
     getGoods(1, 500).then(res => {
       this.goodsoptions = res.data.data.records;
     });
@@ -1585,13 +1604,15 @@ export default {
       this.onLoad(this.page);
     },
     searchChange(params, done) {
+      this.search = this.deepClone(params);
       this.onLoad(this.page, params);
       done();
     },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId, params)
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
         .then(res => {
           const data = res.data.data;
           this.page.total = data.total;
@@ -1613,7 +1634,7 @@ export default {
           cname: e.cname,
           ename: e.ename,
           priceCategory: e.goodsTypeName,
-          purchaseCost:costCal(e.price,e.taxRate),
+          purchaseCost: costCal(e.price, e.taxRate),
           purchaseAmount: e.purchaseAmount,
           itemProp: null,
           remarksOne: null,

+ 23 - 2
src/views/exportTrade/customerInquiry/index.vue

@@ -243,12 +243,22 @@ export default {
       return IntegerFormat(num);
     }
   },
+  activated() {
+    if (!this.$store.getters.bjStatus && !this.show) {
+      this.show = true;
+    }
+    if (this.$route.query.id) {
+      setTimeout(() => {
+        this.editOpen({ id: this.$route.query.id }, 1);
+      }, 100);
+    }
+  },
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 189;
+        this.option.height = this.option.height - 191;
       } else {
-        this.option.height = this.option.height + 189;
+        this.option.height = this.option.height + 191;
       }
       this.$refs.crud.getTableHeight();
     },
@@ -293,6 +303,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("IN_BJ_STATUS");
     },
     copyDoc() {
       this.selectionList.forEach(e => {
@@ -301,6 +312,7 @@ export default {
           status: "copy"
         };
         this.show = false;
+        this.$store.commit("IN_BJ_STATUS");
       });
     },
     copyOrder(id) {
@@ -311,6 +323,7 @@ export default {
       };
       this.$nextTick(() => {
         this.show = false;
+        this.$store.commit("IN_BJ_STATUS");
       });
     },
     //点击搜索按钮触发
@@ -412,11 +425,19 @@ export default {
     },
     newAdd() {
       this.show = false;
+      this.$store.commit("IN_BJ_STATUS");
     },
     goBack() {
+      if (this.$route.query.id) {
+        this.$router.$avueRouter.closeTag(this.$route.fullPath);
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index"
+        });
+      }
       this.detailData = this.$options.data().detailData;
       this.show = true;
       this.onLoad(this.page, this.search);
+      this.$store.commit("OUT_BJ_STATUS");
     },
     async saveColumn() {
       /**

+ 20 - 9
src/views/exportTrade/invoice/detailsPage.vue

@@ -241,6 +241,8 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
               @row-click="rowClick"
@@ -475,7 +477,8 @@ export default {
       loading: false,
       subLoading: false,
       pageLoading: false,
-      showBut: true
+      showBut: true,
+      search: {}
     };
   },
   props: {
@@ -675,18 +678,26 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.goodsList = data.records;
-        this.loading = false;
-        if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 350;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
+        res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          this.loading = false;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
         }
-      });
+      );
     },
     //商品明细导入
     newDetails() {

+ 2 - 2
src/views/exportTrade/invoice/index.vue

@@ -184,9 +184,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 189;
+        this.option.height = this.option.height - 191;
       } else {
-        this.option.height = this.option.height + 189;
+        this.option.height = this.option.height + 191;
       }
       this.$refs.crud.getTableHeight();
     },

+ 20 - 9
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -316,6 +316,8 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
               @row-click="rowClick"
@@ -627,7 +629,8 @@ export default {
       oldorderFilesList: [],
       subLoading: false,
       pageLoading: false,
-      showBut: true
+      showBut: true,
+      search: {}
     };
   },
   props: {
@@ -829,18 +832,26 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.goodsList = data.records;
-        this.loading = false;
-        if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 350;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
+        res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          this.loading = false;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
         }
-      });
+      );
     },
     //商品明细导入
     newDetails() {

+ 2 - 2
src/views/exportTrade/purchaseContract/index.vue

@@ -177,9 +177,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 138;
+        this.option.height = this.option.height - 139;
       } else {
-        this.option.height = this.option.height + 138;
+        this.option.height = this.option.height + 139;
       }
       this.$refs.crud.getTableHeight();
     },

+ 20 - 9
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -268,6 +268,8 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
               @row-click="rowClick"
@@ -485,7 +487,8 @@ export default {
       pageLoading: false,
       showBut: true,
       goodsoptions: [],
-      currencyList: []
+      currencyList: [],
+      search: {}
     };
   },
   props: {
@@ -705,18 +708,26 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.goodsList = data.records;
-        this.loading = false;
-        if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 350;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
+        res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          this.loading = false;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
         }
-      });
+      );
     },
     //商品明细导入
     newDetails() {

+ 2 - 2
src/views/exportTrade/purchaseInquiry/index.vue

@@ -175,9 +175,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 143;
+        this.option.height = this.option.height - 144;
       } else {
-        this.option.height = this.option.height + 143;
+        this.option.height = this.option.height + 144;
       }
       this.$refs.crud.getTableHeight();
     },

+ 20 - 9
src/views/exportTrade/receipt/detailsPage.vue

@@ -226,6 +226,8 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
               @row-click="rowClick"
@@ -487,7 +489,8 @@ export default {
       oldorderFilesList: [],
       subLoading: false,
       pageLoading: false,
-      showBut: true
+      showBut: true,
+      search: {}
     };
   },
   props: {
@@ -691,18 +694,26 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.goodsList = data.records;
-        this.loading = false;
-        if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 350;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
+        res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          this.loading = false;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
         }
-      });
+      );
     },
     //商品明细导入
     newDetails() {

+ 2 - 2
src/views/exportTrade/receipt/index.vue

@@ -168,9 +168,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 189;
+        this.option.height = this.option.height - 191;
       } else {
-        this.option.height = this.option.height + 189;
+        this.option.height = this.option.height + 191;
       }
       this.$refs.crud.getTableHeight();
     },

+ 44 - 10
src/views/exportTrade/salesContract/detailsPage.vue

@@ -187,12 +187,30 @@
               @change="exchangeRateChange"
             />
           </template>
+          <template slot="boxPile">
+            <el-select
+              size="small"
+              v-model="form.boxPile"
+              placeholder="请选择"
+              clearable
+              filterable
+              :disabled="detailData.status == 1"
+            >
+              <el-option
+                v-for="item in allBoxs"
+                :key="item.id"
+                :label="item.name"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
+          </template>
           <template slot="boxNumber">
             <el-input
               size="mini"
               v-model="form.boxNumber"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              placeholder="请输入 起订量"
+              placeholder="请输入 量"
               :disabled="detailData.status == 1"
             />
           </template>
@@ -614,6 +632,8 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
               @row-click="rowClick"
@@ -672,6 +692,7 @@ import {
   getPricedetail,
   pleaseCheck
 } from "@/api/basicData/salesContract";
+import { getAllBoxs } from "@/api/basicData/portinformation";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
 import partDialog from "@/components/part-dialog/main";
@@ -1090,7 +1111,9 @@ export default {
       goodsoptions: [],
       priceTermsList: [],
       paymentTermList: [],
-      currencyList: []
+      currencyList: [],
+      allBoxs: [],
+      search: {}
     };
   },
   props: {
@@ -1160,6 +1183,9 @@ export default {
     getGoods(1, 500).then(res => {
       this.goodsoptions = res.data.data.records;
     });
+    getAllBoxs().then(res => {
+      this.allBoxs = res.data.data;
+    });
   },
   filters: {
     isDiscount(val) {
@@ -1730,18 +1756,26 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.goodsList = data.records;
-        this.loading = false;
-        if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 350;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
+        res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          this.loading = false;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
         }
-      });
+      );
     },
     importLibray(rows) {
       rows.forEach(e => {

+ 24 - 2
src/views/exportTrade/salesContract/index.vue

@@ -236,17 +236,28 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
   },
+
   filters: {
     IntegerFormat(num) {
       return IntegerFormat(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);
+    }
+  },
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 189;
+        this.option.height = this.option.height - 191;
       } else {
-        this.option.height = this.option.height + 189;
+        this.option.height = this.option.height + 191;
       }
       this.$refs.crud.getTableHeight();
     },
@@ -287,11 +298,18 @@ export default {
     },
     //查看跳转页面
     editOpen(row, status) {
+      if (this.$route.query.id) {
+        this.$router.$avueRouter.closeTag(this.$route.fullPath);
+        this.$router.push({
+          path: "/exportTrade/salesContract/index"
+        });
+      }
       this.detailData = {
         id: row.id,
         status: status
       };
       this.show = false;
+      this.$store.commit("IN_XS_STATUS");
     },
     //点击搜索按钮触发
     searchChange(params, done) {
@@ -354,6 +372,7 @@ export default {
         pageType: type
       };
       this.show = false;
+      this.$store.commit("IN_XS_STATUS");
     },
     copyDoc() {
       this.selectionList.forEach(e => {
@@ -362,6 +381,7 @@ export default {
           status: "copy"
         };
         this.show = false;
+        this.$store.commit("IN_XS_STATUS");
       });
     },
     copyOrder(id) {
@@ -372,12 +392,14 @@ export default {
       };
       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 = [];

+ 20 - 9
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -176,6 +176,8 @@
               :table-loading="loading"
               :data="goodsList"
               ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
               @refresh-change="refreshChange"
               @selection-change="selectionChange"
               @row-click="rowClick"
@@ -357,7 +359,8 @@ export default {
       oldfreightData: [],
       subLoading: false,
       pageLoading: false,
-      showBut: true
+      showBut: true,
+      search: {}
     };
   },
   props: {
@@ -474,18 +477,26 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
     //费用查询
     onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.goodsList = data.records;
-        this.loading = false;
-        if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 350;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
+        res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          this.loading = false;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
         }
-      });
+      );
     },
     getDetail(id) {
       this.showBut = false;

+ 2 - 2
src/views/exportTrade/shippingInquiry/index.vue

@@ -125,9 +125,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 92;
+        this.option.height = this.option.height - 93;
       } else {
-        this.option.height = this.option.height + 92;
+        this.option.height = this.option.height + 93;
       }
       this.$refs.crud.getTableHeight();
     },

+ 2 - 2
src/views/maintenance/priceLibrary/index.vue

@@ -372,13 +372,13 @@ export default {
       this.page.currentPage = 1;
       this.page.pageSize = val;
     },
-    onLoad(page, params) {
+    onLoad(page, params = {}) {
       params = {
         ...params,
         tradeType: "CK"
       };
       this.loading = true;
-      getList(page.currentPage, page.pageSize, params)
+      getList(page.currentPage, page.pageSize,Object.assign(params, this.search))
         .then(res => {
           // if (res.data.data.records) {
           //   res.data.data.records.forEach(e => {

+ 55 - 22
src/views/statisticAnalysis/salesProfit/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-show="isShow" class="page-crad">
+    <basic-container class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -33,7 +33,11 @@
             :table-loading="row.itemLoading"
             :cell-style="cellStyle"
             class="itemTable"
-          ></avue-crud>
+          >
+            <template slot-scope="{ row }" slot="amount">
+              <span>{{ row.amount | decimalFormat }}</span>
+            </template>
+          </avue-crud>
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
@@ -53,8 +57,30 @@
         <template slot-scope="{ row }" slot="purchasePrice">
           <span>{{ row.purchasePrice | decimalFormat }}</span>
         </template>
-        <template slot-scope="{ row }" slot="amount">
-          <span>{{ row.amount | decimalFormat }}</span>
+        <template slot-scope="{ row }" slot="procurementCost">
+          <span>{{ row.procurementCost | decimalFormat }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="partsCost">
+          <span>{{ row.partsCost | decimalFormat }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="grossProfit">
+          <span>{{ row.grossProfit | decimalFormat }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="fd">
+          <span>{{ row.fd | decimalFormat }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="fc">
+          <span>{{ row.fc | decimalFormat }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="singleTicketMargin">
+          <span>{{ row.singleTicketMargin | decimalFormat }}</span>
+        </template>
+        <template slot-scope="scope" slot="orderNo">
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="editOpen(scope.row)"
+            >{{ scope.row.orderNo }}
+          </span>
         </template>
       </avue-crud>
     </basic-container>
@@ -74,7 +100,6 @@ export default {
       search: {},
       dataList: [],
       loading: false,
-      isShow: true,
       detailData: {},
       page: {
         pageSize: 10,
@@ -160,12 +185,18 @@ export default {
             width: 100
           },
           {
-            label: "采购成本",
+            label: "产品成本",
             prop: "procurementCost",
             overHidden: true,
             width: 100
           },
           {
+            label: "配件成本",
+            prop: "partsCost",
+            overHidden: true,
+            width: 100
+          },
+          {
             label: "采购报价",
             prop: "purchasePrice",
             overHidden: true,
@@ -362,19 +393,25 @@ export default {
           this.loading = false;
         });
     },
-    //新增跳转页面
-    beforeOpen() {
-      this.isShow = false;
-    },
-    editOpen(row, status) {
-      this.detailData = {
-        id: row.id,
-        status: status
-      };
-      this.isShow = false;
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
     },
-    outExport(){
-         if (!this.search.billType) {
+    outExport() {
+      if (!this.search.billType) {
         return this.$message.error("请选择类别");
       }
       window.open(
@@ -383,10 +420,6 @@ export default {
         }=${getToken()}&billType=${this.search.billType}`
       );
     },
-    goBack() {
-      this.detailData = this.$options.data().detailData;
-      this.isShow = true;
-    },
     summaryMethod({ columns, data }) {
       const sums = [];
       if (columns.length > 0) {