Przeglądaj źródła

前端 采购计划 sdy

zhongtianhaoyuan 3 lat temu
rodzic
commit
3c67258b63
28 zmienionych plików z 2446 dodań i 1121 usunięć
  1. 4 1
      src/api/V2/contract/index.js
  2. 18 0
      src/api/V2/salesManagement/index.js
  3. 3 1
      src/model/contarct/index.js
  4. 32 0
      src/model/salesManagement/index.js
  5. 0 1
      src/views/contractManagement/futuresPurchaseContract.vue
  6. 15 1
      src/views/contractManagement/futuresPurchaseContractAdd.vue
  7. 15 1
      src/views/contractManagement/futuresPurchaseContractEdit.vue
  8. 18 18
      src/views/contractManagement/futuresSalesContractAdd.vue
  9. 23 25
      src/views/contractManagement/futuresSalesContractEdit.vue
  10. 77 65
      src/views/contractManagement/priceConfirmationSheet.vue
  11. 16 7
      src/views/contractManagement/priceConfirmationSheetAdd.vue
  12. 68 67
      src/views/contractManagement/priceConfirmationSheetEdit.vue
  13. 218 7
      src/views/financialManagement/collectionManagementList.vue
  14. 5 30
      src/views/purchasingManagement/procurementPlanAdd.vue
  15. 147 125
      src/views/purchasingManagement/procurementPlanEdit.vue
  16. 5 2
      src/views/purchasingManagement/procurementPlanList.vue
  17. 3 3
      src/views/purchasingManagement/procurementPlanLook.vue
  18. 3 144
      src/views/purchasingManagement/purchaseOrderList.vue
  19. 686 188
      src/views/salesManagement/salesPlanAdd.vue
  20. 532 178
      src/views/salesManagement/salesPlanEdit.vue
  21. 325 140
      src/views/salesManagement/salesPlanList.vue
  22. 49 72
      src/views/salesManagement/salesPlanLook.vue
  23. 3 9
      src/views/salesManagement/salesPlanOrderList.vue
  24. 42 1
      src/views/statisticalReport/purchaseClosingCashierList.vue
  25. 42 1
      src/views/statisticalReport/purchaseReceiptStatisticsList.vue
  26. 42 1
      src/views/statisticalReport/salesClosingCashierList.vue
  27. 54 32
      src/views/statisticalReport/salesDeliveryReportList.vue
  28. 1 1
      vue.config.js

+ 4 - 1
src/api/V2/contract/index.js

@@ -38,4 +38,7 @@ export const API_POST_CONFIRMATIONSHEET_EDIT = '/priceConfirmationSheet/api/edit
 export const API_POST_CONFIRMATIONSHEET_ADD = '/priceConfirmationSheet/api/addPriceConfirmationSheet'
 export const API_POST_CONFIRMATIONSHEET_ADD = '/priceConfirmationSheet/api/addPriceConfirmationSheet'
 
 
 //删除点价确认单
 //删除点价确认单
-export const API_POST_CONFIRMATIONSHEET_DELETE = '/priceConfirmationSheet/api/deletePriceConfirmationSheet'
+export const API_POST_CONFIRMATIONSHEET_DELETE = '/priceConfirmationSheet/api/deletePriceConfirmationSheet'
+
+//编辑时查看点价确认单
+export const API_GET_GETINFO = '/priceConfirmationSheet/getInfo'

+ 18 - 0
src/api/V2/salesManagement/index.js

@@ -0,0 +1,18 @@
+//销售订单列表
+export const API_GET_SALE_ORDER_LIST = '/saleOrder/selectSaleOrder'
+//销售订单成交
+export const API_POST_SALE_ORDER_DEAL = '/saleOrder/api/deal'
+//销售订单平仓
+export const API_POST_SALE_CLOSEPOSITION = '/saleOrder/api/closePosition'
+//销售计划列表
+export const API_GET_SALEPLAN_LIST = '/salePlanInfo/selectSalePlanInfo'
+//销售计划查看
+export const API_GET_SALEPLAN_LOOK = '/salePlanInfo/getSalePlanInfo'
+//销售计划添加
+export const API_POST_SALEPLAN_ADD = '/salePlanInfo/api/insertSalePlanInfo'
+//销售计划编辑
+export const API_POST_SALEPLAN_EDIT = '/salePlanInfo/api/editSalePlanInfo'
+//销售计划删除
+export const API_POST_SALEPLAN_DELETE = '/salePlanInfo/api/deleteSalePlanInfo'
+//销售状态,基差,单价修改 
+export const API_POST_SALEPLAN_EDITSTATUS = '/salePlanInfo/api/editStatus'

+ 3 - 1
src/model/contarct/index.js

@@ -19,6 +19,7 @@ import {
     API_GET_SELECTCONFIRMATIONSHEET,
     API_GET_SELECTCONFIRMATIONSHEET,
     API_POST_CONFIRMATIONSHEET_EDIT,
     API_POST_CONFIRMATIONSHEET_EDIT,
     API_POST_CONFIRMATIONSHEET_ADD,
     API_POST_CONFIRMATIONSHEET_ADD,
+    API_GET_GETINFO,
     API_POST_CONFIRMATIONSHEET_DELETE,
     API_POST_CONFIRMATIONSHEET_DELETE,
     API_GET_STAFF
     API_GET_STAFF
 } from '@/api/V2/contract'
 } from '@/api/V2/contract'
@@ -62,4 +63,5 @@ export const addPriceConfirmationSheet = appRx.post(API_POST_CONFIRMATIONSHEET_A
 //删除点价确认单
 //删除点价确认单
 export const deletePriceConfirmationSheet = appRx.post(API_POST_CONFIRMATIONSHEET_DELETE, errorCatcher, errorHandle, filter)
 export const deletePriceConfirmationSheet = appRx.post(API_POST_CONFIRMATIONSHEET_DELETE, errorCatcher, errorHandle, filter)
 
 
-
+//编辑时查看点价确认单
+export const getInfo = appRx.get(API_GET_GETINFO, errorCatcher, errorHandle, filter)

+ 32 - 0
src/model/salesManagement/index.js

@@ -0,0 +1,32 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+import {
+    API_GET_SALE_ORDER_LIST,
+    API_POST_SALE_ORDER_DEAL,
+    API_POST_SALE_CLOSEPOSITION,
+    API_GET_SALEPLAN_LIST,
+    API_GET_SALEPLAN_LOOK,
+    API_POST_SALEPLAN_ADD,
+    API_POST_SALEPLAN_EDIT,
+    API_POST_SALEPLAN_DELETE,
+    API_POST_SALEPLAN_EDITSTATUS,
+} from '@/api/V2/salesManagement'
+// import { API_GET_PROCUREMENT_LOOK } from '../../api/V2/purchasingManagement'
+//销售详情列表
+export const detailsList = appRx.get(API_GET_SALE_ORDER_LIST, errorCatcher, errorHandle, filter)
+//销售详情成交
+export const chengList = appRx.post(API_POST_SALE_ORDER_DEAL, errorCatcher, errorHandle, filter)
+//销售详情平仓
+export const closePositionList = appRx.post(API_POST_SALE_CLOSEPOSITION, errorCatcher, errorHandle,filter)
+//销售计划列表
+export const salePlan = appRx.get(API_GET_SALEPLAN_LIST,errorCatcher, errorHandle, filter)
+//销售计划查看
+export const saleLook = appRx.get(API_GET_SALEPLAN_LOOK, errorCatcher, errorHandle,filter)
+//销售计划添加
+export const saleAdd = appRx.post(API_POST_SALEPLAN_ADD, errorCatcher, errorHandle,filter)
+//销售计划编辑
+export const saleEdit = appRx.post(API_POST_SALEPLAN_EDIT, errorCatcher, errorHandle,filter)
+//销售计划删除
+export const saleDel = appRx.post(API_POST_SALEPLAN_DELETE, errorCatcher,errorHandle,filter)
+//销售状态,基差,单价修改
+export const saleEditOther = appRx.post(API_POST_SALEPLAN_EDITSTATUS, errorCatcher,errorHandle,filter)

+ 0 - 1
src/views/contractManagement/futuresPurchaseContract.vue

@@ -159,7 +159,6 @@
             @click="editClick(scope.row)"
             @click="editClick(scope.row)"
             alt=""
             alt=""
           />
           />
-          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>

+ 15 - 1
src/views/contractManagement/futuresPurchaseContractAdd.vue

@@ -1127,13 +1127,20 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (this.selectedOptions1.length == 0) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
         this.$message({
           message: '请选择交货所在地区!',
           message: '请选择交货所在地区!',
           type: 'warning',
           type: 'warning',
         })
         })
         return
         return
       }
       }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择产地!',
+          type: 'warning',
+        })
+        return
+      }
       
       
       if (!this.deptBudgetList.deliveryDateStart) {
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
         this.$message({
@@ -1188,6 +1195,13 @@ export default {
         })
         })
         return
         return
       }
       }
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+        this.$message({
+          message: '请选择转基因',
+          type: 'warning',
+        })
+        return
+      }
       if (
       if (
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=

+ 15 - 1
src/views/contractManagement/futuresPurchaseContractEdit.vue

@@ -1251,13 +1251,20 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (this.selectedOptions1.length == 0) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
         this.$message({
           message: '请选择交货所在地区!',
           message: '请选择交货所在地区!',
           type: 'warning',
           type: 'warning',
         })
         })
         return
         return
       }
       }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择产地!',
+          type: 'warning',
+        })
+        return
+      }
 
 
       if (!this.deptBudgetList.deliveryDateStart) {
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
         this.$message({
@@ -1312,6 +1319,13 @@ export default {
         })
         })
         return
         return
       }
       }
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+        this.$message({
+          message: '请选择转基因',
+          type: 'warning',
+        })
+        return
+      }
       if (
       if (
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=

+ 18 - 18
src/views/contractManagement/futuresSalesContractAdd.vue

@@ -1074,21 +1074,6 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (
-        isNaN(this.deptBudgetList.warehousingFee) ||
-        (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
-          String(this.deptBudgetList.warehousingFee).length -
-            (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.warehousingFee < 0 ||
-        this.deptBudgetList.warehousingFee > 1000
-      ) {
-        this.$message({
-          message: '入库费输入错误!',
-          type: 'warning',
-        })
-        return
-      }
       if (!this.deptBudgetList.measurementStandard) {
       if (!this.deptBudgetList.measurementStandard) {
         this.$message({
         this.$message({
           message: '请输入计量标准!',
           message: '请输入计量标准!',
@@ -1120,13 +1105,20 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (this.selectedOptions1.length == 0) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
         this.$message({
           message: '请选择交货所在地区!',
           message: '请选择交货所在地区!',
           type: 'warning',
           type: 'warning',
         })
         })
         return
         return
       }
       }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择产地!',
+          type: 'warning',
+        })
+        return
+      }
       
       
       if (!this.deptBudgetList.deliveryDateStart) {
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
         this.$message({
@@ -1181,6 +1173,13 @@ export default {
         })
         })
         return
         return
       }
       }
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+        this.$message({
+          message: '请选择转基因',
+          type: 'warning',
+        })
+        return
+      }
       if (
       if (
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
@@ -1299,7 +1298,8 @@ export default {
             ).indexOf('.') +
             ).indexOf('.') +
               1) >
               1) >
             2)
             2)
-      ) {
+      ) 
+      {
         this.$message({
         this.$message({
           message: '合同收入金额输入错误',
           message: '合同收入金额输入错误',
           type: 'warning',
           type: 'warning',
@@ -1374,7 +1374,7 @@ export default {
           this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions[1]]
           this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions[1]]
         
         
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.compId = this.compId
-          this.deptBudgetList.contractType = 2
+          this.deptBudgetList.contractType = 1
           this.deptBudgetList.goodsType = 2
           this.deptBudgetList.goodsType = 2
            if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
            if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
             this.deptBudgetList.deliveryArea = "特别行政区"
             this.deptBudgetList.deliveryArea = "特别行政区"

+ 23 - 25
src/views/contractManagement/futuresSalesContractEdit.vue

@@ -743,6 +743,10 @@ export default {
           tmp[0] = TextToCode[response.deliveryProvince].code
           tmp[0] = TextToCode[response.deliveryProvince].code
           tmp[1] =
           tmp[1] =
             TextToCode[response.deliveryProvince][response.deliveryCity].code
             TextToCode[response.deliveryProvince][response.deliveryCity].code
+          tmp[2] =
+            TextToCode[response.deliveryProvince][response.deliveryCity][
+              response.deliveryArea
+            ].code
 
 
           if (tmp[0] == 810000 || tmp[0] == 820000) {
           if (tmp[0] == 810000 || tmp[0] == 820000) {
             tmp[2] = null
             tmp[2] = null
@@ -752,11 +756,12 @@ export default {
                 response.deliveryArea
                 response.deliveryArea
               ].code
               ].code
           }
           }
-          this.selectedOptions1 = tmp1
+          this.selectedOptions = tmp
           var tmp1 = []
           var tmp1 = []
           tmp1[0] = TextToCode[response.contractGoodsInfo.outputPrivate].code
           tmp1[0] = TextToCode[response.contractGoodsInfo.outputPrivate].code
           tmp1[1] =
           tmp1[1] =
             TextToCode[response.contractGoodsInfo.outputPrivate][response.contractGoodsInfo.outputCity].code
             TextToCode[response.contractGoodsInfo.outputPrivate][response.contractGoodsInfo.outputCity].code
+          this.selectedOptions1 = tmp1
           if (this.deptBudgetList.deliverType == 1) {
           if (this.deptBudgetList.deliverType == 1) {
             this.deptBudgetList.deliverType1 = '我方自提'
             this.deptBudgetList.deliverType1 = '我方自提'
           } else if (this.deptBudgetList.deliverType == 2) {
           } else if (this.deptBudgetList.deliverType == 2) {
@@ -1187,28 +1192,6 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (!this.deptBudgetList.warehousingFee) {
-        this.$message({
-          message: '请输入入库费!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        isNaN(this.deptBudgetList.warehousingFee) ||
-        (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
-          String(this.deptBudgetList.warehousingFee).length -
-            (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.warehousingFee < 0 ||
-        this.deptBudgetList.warehousingFee > 1000
-      ) {
-        this.$message({
-          message: '入库费输入错误!',
-          type: 'warning',
-        })
-        return
-      }
       if (!this.deptBudgetList.measurementStandard) {
       if (!this.deptBudgetList.measurementStandard) {
         this.$message({
         this.$message({
           message: '请输入计量标准!',
           message: '请输入计量标准!',
@@ -1240,13 +1223,20 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (this.selectedOptions1.length == 0) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
         this.$message({
           message: '请选择交货所在地区!',
           message: '请选择交货所在地区!',
           type: 'warning',
           type: 'warning',
         })
         })
         return
         return
       }
       }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择产地!',
+          type: 'warning',
+        })
+        return
+      }
       
       
       if (!this.deptBudgetList.deliveryDateStart) {
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
         this.$message({
@@ -1301,6 +1291,13 @@ export default {
         })
         })
         return
         return
       }
       }
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+        this.$message({
+          message: '请选择转基因',
+          type: 'warning',
+        })
+        return
+      }
       if (
       if (
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
@@ -1492,7 +1489,8 @@ export default {
           this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions[1]]
           this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions[1]]
         
         
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.compId = this.compId
-          this.deptBudgetList.contractType = 2
+          this.deptBudgetList.contractType = 1
+          this.deptBudgetList.goodsType = 2
            if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
            if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
             this.deptBudgetList.deliveryArea = "特别行政区"
             this.deptBudgetList.deliveryArea = "特别行政区"
           }else{ 
           }else{ 

+ 77 - 65
src/views/contractManagement/priceConfirmationSheet.vue

@@ -2,7 +2,15 @@
   <div class="container">
   <div class="container">
     <el-row>
     <el-row>
       <el-col :span="12">
       <el-col :span="12">
-        <h2 class="bg-left title">点价确认单</h2>
+        <h2 class="bg-left title">
+          点价确认单(
+          <template>
+            <span v-if="this.$route.query.contractType == 1">期货销售合同</span>
+            <span v-if="this.$route.query.contractType == 2"
+              >期货采购合同</span
+            > </template
+          >)
+        </h2>
       </el-col>
       </el-col>
       <el-col :span="12" class="bg-right">
       <el-col :span="12" class="bg-right">
         <el-button
         <el-button
@@ -25,9 +33,11 @@
       <h3>所属合同</h3>
       <h3>所属合同</h3>
       <p>
       <p>
         &nbsp;&nbsp;<template>
         &nbsp;&nbsp;<template>
-              <span v-if="this.$route.query.contractType == '1'">销售合同</span>
-              <span v-if="this.$route.query.contractType == '2'">采购合同</span>
-            </template>(
+          <span v-if="this.$route.query.contractType == 1">销售合同</span>
+          <span v-if="this.$route.query.contractType == 2"
+            >采购合同</span
+          > </template
+        >(
         <template>{{ this.$route.query.contractNo }}</template>
         <template>{{ this.$route.query.contractNo }}</template>
         )
         )
       </p>
       </p>
@@ -53,48 +63,38 @@
         >
         >
       </div>
       </div>
     </div>
     </div>
-    <div  v-for="(item,index) in deptBudgetList" :key="index">
+    <div v-for="(item, index) in deptBudgetList" :key="index">
       <div class="dianjiadanbianhao">
       <div class="dianjiadanbianhao">
         <h3>点价单编号</h3>
         <h3>点价单编号</h3>
         <p>
         <p>
           <template>{{ item.priceListNo }}</template>
           <template>{{ item.priceListNo }}</template>
         </p>
         </p>
         <div class="fujian">
         <div class="fujian">
-          <el-upload
-            class="upload-demo"
-            action="https://www.zthymaoyi.com/upload/admin"
-            :on-success="
-              (res, file) => {
-                uploadSuccessHandle(res)
-              }
-            "
-            multiple
-            :limit="3"
-            :file-list="fileList"
-          >
-            <el-button size="small" type="primary">附件</el-button>
-          </el-upload>
+          <el-button size="small" type="primary">附件</el-button>
           <div class="shangchuan">
           <div class="shangchuan">
             <template>
             <template>
-              <span v-if="item.enclosureTypeFlag == '0'">未上传</span>
-              <span v-if="item.enclosureTypeFlag == '1'">已上传</span>
+              <span v-if="item.enclosureTypeFlag == 0">未上传</span>
+              <span v-if="item.enclosureTypeFlag == 1">已上传</span>
             </template>
             </template>
           </div>
           </div>
         </div>
         </div>
         <div class="caozuoanniu">
         <div class="caozuoanniu">
-          <el-button class="find" type="primary" @click="sheetEdit(item)"
-            >编辑</el-button
-          >
-          <el-button class="find" type="primary" @click="sheetDelete()"
-            >删除</el-button
-          >
+          <template>
+            <el-button class="find" type="primary" @click="sheetEdit(item)"
+              >编辑</el-button
+            >
+            <el-button
+              class="find"
+              type="primary"
+              @click="sheetDelete(item)"
+              v-if="item.enclosureTypeFlag != 1"
+              >删除</el-button
+            >
+          </template>
         </div>
         </div>
       </div>
       </div>
       <div class="center">
       <div class="center">
-        <ws-form
-          ref="deptBudgetList"
-          :model="deptBudgetList"
-        >
+        <ws-form ref="deptBudgetList" :model="deptBudgetList">
           <!--基本信息-->
           <!--基本信息-->
           <ws-info-table>
           <ws-info-table>
             <ws-form-item
             <ws-form-item
@@ -207,7 +207,8 @@ export default {
       // 提交类型
       // 提交类型
       submitType: true,
       submitType: true,
       contractNo: '',
       contractNo: '',
-      contractType:'',
+      contractType: '',
+      id: '',
       size: 10,
       size: 10,
       unitList: [],
       unitList: [],
       addressUrls: [],
       addressUrls: [],
@@ -236,50 +237,61 @@ export default {
     returnsales() {
     returnsales() {
       if(this.$route.query.contractType == '1'){
       if(this.$route.query.contractType == '1'){
         this.$router.push({ path: 'futuresSalesContractExamine',
         this.$router.push({ path: 'futuresSalesContractExamine',
-        query: { contractNo: this.deptBudgetList.contractNo , contractType: this.deptBudgetList.contractType } })
+        query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
+        // this.$router.go(-1)
       }else{
       }else{
         this.$router.push({ path: 'futuresPurchaseContractExamine',
         this.$router.push({ path: 'futuresPurchaseContractExamine',
-        query: { contractNo: this.deptBudgetList.contractNo , contractType: this.deptBudgetList.contractType } })
+        query: { contractNo: this.$route.query.contractNo, contractType: this.$route.query.contractType } })
+        // this.$router.go(-1)
       }
       }
-      
+      // 
     },
     },
     //创建点价确认单
     //创建点价确认单
     sheetAdd() {
     sheetAdd() {
-      this.$router.push({ path: 'priceConfirmationSheetAdd' 
-      ,query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
+      this.$router.push({
+        path: 'priceConfirmationSheetAdd',
+        query: {
+          contractNo: this.$route.query.contractNo,
+          contractType: this.$route.query.contractType,
+        },
+      })
     },
     },
     // 编辑点价确认单
     // 编辑点价确认单
     sheetEdit(item) {
     sheetEdit(item) {
-      this.$router.push({ path: 'priceConfirmationSheetEdit' ,
-        query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType ,priceListNo:item.priceListNo}})
+      this.$router.push({
+        path: 'priceConfirmationSheetEdit',
+        query: {
+          contractNo: this.$route.query.contractNo,
+          contractType: this.$route.query.contractType,
+          id: item.id,
+        },
+      })
     },
     },
     // 删除点价确认单
     // 删除点价确认单
-    sheetDelete(row) {
-        this.$confirm(`确认单删除后不可恢复,是否确定删除?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        })
-          .then(() => {
-            deletePriceConfirmationSheet({ id: row.id })
-              .toPromise()
-              .then((response) => {
-                this.$notify.success({
-                  title: '成功',
-                  message: '删除成功',
-                })
-                this.getUnitList()
-                this.pleaseChoose = ''
-              })
-              .catch((response) => {
-                console.log(response)
-                EventBus.$emit('error', response.message)
+    sheetDelete(item) {
+      this.$confirm(`确认单删除后不可恢复,是否确定删除?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.id = deletePriceConfirmationSheet({ id: item.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
               })
               })
-          })
-          .catch(() => {
-            return false
-          })
-   
+              this.getUnitList()
+            })
+            .catch((response) => {
+              console.log(response)
+              EventBus.$emit('error', response.message)
+            })
+        })
+        .catch(() => {
+          return false
+        })
     },
     },
     fujian(row) {
     fujian(row) {
       if (row.addressUrl === null || row.addressUrl === '') {
       if (row.addressUrl === null || row.addressUrl === '') {
@@ -295,7 +307,7 @@ export default {
     getUnitList() {
     getUnitList() {
       selectConfirmationSheet({
       selectConfirmationSheet({
         contractNo: this.$route.query.contractNo,
         contractNo: this.$route.query.contractNo,
-        contractType :this.$route.query.contractType,
+        contractType: this.$route.query.contractType,
       })
       })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {

+ 16 - 7
src/views/contractManagement/priceConfirmationSheetAdd.vue

@@ -2,7 +2,12 @@
   <div class="container">
   <div class="container">
     <el-row>
     <el-row>
       <el-col :span="12">
       <el-col :span="12">
-        <h2 class="bg-left title">创建点价确认单</h2>
+        <h2 class="bg-left title">创建点价确认单(
+        <template>
+          <span v-if="this.$route.query.contractType == 1">期货销售合同</span>
+          <span v-if="this.$route.query.contractType == 2"
+            >期货采购合同</span
+          > </template>)</h2>
       </el-col>
       </el-col>
       <el-col :span="12" class="bg-right">
       <el-col :span="12" class="bg-right">
         <el-button
         <el-button
@@ -53,7 +58,7 @@
           </ws-form-item>
           </ws-form-item>
 
 
           <!--点价单附件-->
           <!--点价单附件-->
-          <ws-form-item label="点价单附件" span="1" prop="priceListNo">
+          <ws-form-item label="点价单附件" span="1" prop="addressUrl">
             <el-upload
             <el-upload
               class="upload-demo"
               class="upload-demo"
               action="https://www.zthymaoyi.com/upload/admin"
               action="https://www.zthymaoyi.com/upload/admin"
@@ -69,10 +74,10 @@
             </el-upload>
             </el-upload>
             <div class="shangchuan">
             <div class="shangchuan">
               <template>
               <template>
-                <span v-if="deptBudgetList.enclosureTypeFlag == 0"
+                <span v-if="enclosureTypeFlag == 0"
                   >未上传</span
                   >未上传</span
                 >
                 >
-                <span v-if="deptBudgetList.enclosureTypeFlag == 1"
+                <span v-if="enclosureTypeFlag == 1"
                   >已上传</span
                   >已上传</span
                 >
                 >
               </template>
               </template>
@@ -232,20 +237,22 @@ export default {
       year: '',
       year: '',
       options_: regionData,
       options_: regionData,
       selectedOptions: [],
       selectedOptions: [],
+      appendixIdss:'',
       selectedOptions1: [],
       selectedOptions1: [],
       // 提交类型
       // 提交类型
       submitType: true,
       submitType: true,
       size: 10,
       size: 10,
       unitList: [],
       unitList: [],
+      enclosureTypeFlag:0,
       priceConfirmationSheet: {
       priceConfirmationSheet: {
         contractNo: this.$route.query.contractNo,
         contractNo: this.$route.query.contractNo,
         contractType :this.$route.query.contractType,
         contractType :this.$route.query.contractType,
-        enclosureTypeFlag: '0',
         varietyContractDirection: '',
         varietyContractDirection: '',
         buyer: '',
         buyer: '',
         seller: '',
         seller: '',
         sellerPhone: '',
         sellerPhone: '',
         buyerPhone: '',
         buyerPhone: '',
+       // enclosureTypeFlag: 0,
         transactionsNumberHand: '',
         transactionsNumberHand: '',
         transactionsNumber: '',
         transactionsNumber: '',
         transactionPrice: '',
         transactionPrice: '',
@@ -280,7 +287,7 @@ export default {
     // 上传附件
     // 上传附件
     uploadSuccessHandle(e) {
     uploadSuccessHandle(e) {
       this.addressUrls.push(e.url)
       this.addressUrls.push(e.url)
-      this.deptBudgetList.addressUrl = this.addressUrls.toString
+    this.enclosureTypeFlag = 1
     },
     },
     onChange(files) {
     onChange(files) {
       this.fileNum = files
       this.fileNum = files
@@ -474,7 +481,8 @@ export default {
       }
       }
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
-      this.deptBudgetList.enclosureTypeFlag = '0'
+       this.deptBudgetList.addressUrl = this.addressUrls.toString()
+
       this.priceConfirmationSheet = this.deptBudgetList
       this.priceConfirmationSheet = this.deptBudgetList
       this.$confirm(`确定提交确认单信息`, {
       this.$confirm(`确定提交确认单信息`, {
         cancelButtonText: '取消',
         cancelButtonText: '取消',
@@ -486,6 +494,7 @@ export default {
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
           this.$message.success('添加成功')
           this.$message.success('添加成功')
+          this.priceConfirmationSheet = {}
           this.$router.push({ path: 'priceConfirmationSheet'
           this.$router.push({ path: 'priceConfirmationSheet'
           ,query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
           ,query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
         })
         })

+ 68 - 67
src/views/contractManagement/priceConfirmationSheetEdit.vue

@@ -2,14 +2,19 @@
   <div class="container">
   <div class="container">
     <el-row>
     <el-row>
       <el-col :span="12">
       <el-col :span="12">
-        <h2 class="bg-left title">编辑点价确认单</h2>
+        <h2 class="bg-left title">编辑点价确认单(
+        <template>
+          <span v-if="this.$route.query.contractType == 1">期货销售合同</span>
+          <span v-if="this.$route.query.contractType == 2"
+            >期货采购合同</span
+          > </template>)</h2>
       </el-col>
       </el-col>
       <el-col :span="12" class="bg-right">
       <el-col :span="12" class="bg-right">
         <el-button
         <el-button
           class="bg-bottom"
           class="bg-bottom"
           type="primary"
           type="primary"
           size="small"
           size="small"
-          @click="returnsales()"
+          @click="returnsales(item)"
           ><img
           ><img
             width="6"
             width="6"
             height="10"
             height="10"
@@ -36,8 +41,6 @@
       <ws-form
       <ws-form
         ref="deptBudgetList"
         ref="deptBudgetList"
         :model="deptBudgetList"
         :model="deptBudgetList"
-        v-for="(item, index) in deptBudgetList"
-        :key="index"
       >
       >
         <!--基本信息-->
         <!--基本信息-->
 
 
@@ -50,7 +53,7 @@
             class="readonly"
             class="readonly"
           >
           >
             <ws-input
             <ws-input
-              v-model="item.priceListNo"
+              v-model="deptBudgetList.priceListNo"
               placeholder="请输入点价单编号"
               placeholder="请输入点价单编号"
               maxlength="20"
               maxlength="20"
               size="small"
               size="small"
@@ -58,7 +61,7 @@
           </ws-form-item>
           </ws-form-item>
 
 
           <!--点价单附件-->
           <!--点价单附件-->
-          <ws-form-item label="点价单附件" span="1" prop="priceListNo">
+          <ws-form-item label="点价单附件" span="1" prop="addressUrl">
             <el-upload
             <el-upload
               class="upload-demo"
               class="upload-demo"
               action="https://www.zthymaoyi.com/upload/admin"
               action="https://www.zthymaoyi.com/upload/admin"
@@ -74,8 +77,8 @@
             </el-upload>
             </el-upload>
             <div class="shangchuan">
             <div class="shangchuan">
               <template>
               <template>
-                <span v-if="item.enclosureTypeFlag == '0'">未上传</span>
-                <span v-if="item.enclosureTypeFlag == '1'">已上传</span>
+                <span v-if="deptBudgetList.enclosureTypeFlag == 0">未上传</span>
+                <span v-if="deptBudgetList.enclosureTypeFlag == 1">已上传</span>
               </template>
               </template>
             </div>
             </div>
           </ws-form-item>
           </ws-form-item>
@@ -88,7 +91,7 @@
             class="readonly"
             class="readonly"
           >
           >
             <ws-input
             <ws-input
-              v-model="item.varietyContractDirection"
+              v-model="deptBudgetList.varietyContractDirection"
               placeholder="请输入品种合约及方向"
               placeholder="请输入品种合约及方向"
               maxlength="100"
               maxlength="100"
               size="small"
               size="small"
@@ -98,7 +101,7 @@
           <!--买方联络人-->
           <!--买方联络人-->
           <ws-form-item label="买方联络人" span="1" prop="buyer">
           <ws-form-item label="买方联络人" span="1" prop="buyer">
             <ws-input
             <ws-input
-              v-model="item.buyer"
+              v-model="deptBudgetList.buyer"
               placeholder="请输入买方联络人"
               placeholder="请输入买方联络人"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
@@ -113,14 +116,14 @@
           >
           >
             <ws-input
             <ws-input
               @input="transactionsNumberHandChange"
               @input="transactionsNumberHandChange"
-              v-model="item.transactionsNumberHand"
+              v-model="deptBudgetList.transactionsNumberHand"
               placeholder="请输入"
               placeholder="请输入"
               maxlength="100"
               maxlength="100"
               size="small"
               size="small"
             />&nbsp;&nbsp;&nbsp;手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;即&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             />&nbsp;&nbsp;&nbsp;手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;即&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <ws-input
             <ws-input
               readonly="readonly"
               readonly="readonly"
-              v-model="item.transactionsNumber"
+              v-model="deptBudgetList.transactionsNumber"
               placeholder="自动计算"
               placeholder="自动计算"
               maxlength="100"
               maxlength="100"
               size="small"
               size="small"
@@ -130,7 +133,7 @@
           <!--买方联络人电话-->
           <!--买方联络人电话-->
           <ws-form-item label="买方联络人电话" span="1" prop="buyerPhone">
           <ws-form-item label="买方联络人电话" span="1" prop="buyerPhone">
             <ws-input
             <ws-input
-              v-model="item.buyerPhone"
+              v-model="deptBudgetList.buyerPhone"
               placeholder="请输入买方联络人电话"
               placeholder="请输入买方联络人电话"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
@@ -144,7 +147,7 @@
             prop="transactionPrice"
             prop="transactionPrice"
           >
           >
             <ws-input
             <ws-input
-              v-model="item.transactionPrice"
+              v-model="deptBudgetList.transactionPrice"
               placeholder="请输入成交价格"
               placeholder="请输入成交价格"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
@@ -154,7 +157,7 @@
           <!--卖方联络人-->
           <!--卖方联络人-->
           <ws-form-item label="卖方联络人" span="1" prop="seller">
           <ws-form-item label="卖方联络人" span="1" prop="seller">
             <ws-input
             <ws-input
-              v-model="item.seller"
+              v-model="deptBudgetList.seller"
               placeholder="请输入卖方联络人"
               placeholder="请输入卖方联络人"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
@@ -164,7 +167,7 @@
           <!--成交日期-->
           <!--成交日期-->
           <ws-form-item label="成交日期" span="1" prop="transactionDate">
           <ws-form-item label="成交日期" span="1" prop="transactionDate">
             <ws-date-picker
             <ws-date-picker
-              v-model="item.transactionDate"
+              v-model="deptBudgetList.transactionDate"
               type="date"
               type="date"
               placeholder="请选择成交日期"
               placeholder="请选择成交日期"
               value-format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
@@ -174,7 +177,7 @@
           <!--卖方联络人电话-->
           <!--卖方联络人电话-->
           <ws-form-item label="卖方联络人电话" span="1" prop="sellerPhone">
           <ws-form-item label="卖方联络人电话" span="1" prop="sellerPhone">
             <ws-input
             <ws-input
-              v-model="item.sellerPhone"
+              v-model="deptBudgetList.sellerPhone"
               placeholder="请输入卖方联络人电话"
               placeholder="请输入卖方联络人电话"
               maxlength="100"
               maxlength="100"
               size="small"
               size="small"
@@ -184,7 +187,7 @@
           <!--备注-->
           <!--备注-->
           <ws-form-item label="备注" span="1" prop="remarks">
           <ws-form-item label="备注" span="1" prop="remarks">
             <ws-input
             <ws-input
-              v-model="item.remarks"
+              v-model="deptBudgetList.remarks"
               placeholder="请输入备注,不超过200字"
               placeholder="请输入备注,不超过200字"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
@@ -207,7 +210,7 @@
 <script>
 <script>
 import {
 import {
   editPriceConfirmationSheet,
   editPriceConfirmationSheet,
-  selectConfirmationSheet,
+  getInfo,
 } from '@/model/contarct/index'
 } from '@/model/contarct/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import { regionData } from 'element-china-area-data'
 import { regionData } from 'element-china-area-data'
@@ -248,10 +251,11 @@ export default {
             priceConfirmationSheet: {
             priceConfirmationSheet: {
          contractNo: this.$route.query.contractNo,
          contractNo: this.$route.query.contractNo,
          contractType :this.$route.query.contractType,
          contractType :this.$route.query.contractType,
-         priceListNo: this.$route.query.priceListNo
-        // enclosureTypeFlag: '0',
-     
+         id: this.$route.query.id,
+         
+           addressUrl: '',
       },
       },
+
       addressUrls: [],
       addressUrls: [],
       deptBudgetList: {},
       deptBudgetList: {},
     }
     }
@@ -276,7 +280,7 @@ export default {
     handleChange1(value) {
     handleChange1(value) {
       this.selectedOptions1 = value
       this.selectedOptions1 = value
     },
     },
-    returnsales() {
+    returnsales(item) {
       this.$router.push({ path: 'priceConfirmationSheet',
       this.$router.push({ path: 'priceConfirmationSheet',
       query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
       query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
     },
     },
@@ -284,7 +288,8 @@ export default {
     // 上传附件
     // 上传附件
     uploadSuccessHandle(e) {
     uploadSuccessHandle(e) {
       this.addressUrls.push(e.url)
       this.addressUrls.push(e.url)
-      this.deptBudgetList.addressUrl = this.addressUrls.toString
+       this.enclosureTypeFlag = 1
+      
     },
     },
     onChange(files) {
     onChange(files) {
       this.fileNum = files
       this.fileNum = files
@@ -295,13 +300,10 @@ export default {
     //数据回显
     //数据回显
     loaddata() {
     loaddata() {
       // 数据
       // 数据
-      selectConfirmationSheet({
+      getInfo({
         contractNo: this.$route.query.contractNo,
         contractNo: this.$route.query.contractNo,
          contractType: this.$route.query.contractType,
          contractType: this.$route.query.contractType,
-         priceListNo: this.$route.query.priceListNo
-
-
-
+         id: this.$route.query.id,
       })
       })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
@@ -318,7 +320,7 @@ export default {
     },
     },
     submit() {
     submit() {
       for (var i = 0; i < this.deptBudgetList.length; i++) {
       for (var i = 0; i < this.deptBudgetList.length; i++) {
-        if (!this.deptBudgetList[i].priceListNo) {
+        if (!this.deptBudgetList.priceListNo) {
           this.$message({
           this.$message({
             message: '点价单编号不能为空!',
             message: '点价单编号不能为空!',
             type: 'warning',
             type: 'warning',
@@ -326,8 +328,8 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].priceListNo.length < 1 ||
-          this.deptBudgetList[i].priceListNo.length > 20
+          this.deptBudgetList.priceListNo.length < 1 ||
+          this.deptBudgetList.priceListNo.length > 20
         ) {
         ) {
           this.$message({
           this.$message({
             message: '点价单编号输入错误!',
             message: '点价单编号输入错误!',
@@ -335,7 +337,7 @@ export default {
           })
           })
           return
           return
         }
         }
-        if (!this.deptBudgetList[i].varietyContractDirection) {
+        if (!this.deptBudgetList.varietyContractDirection) {
           this.$message({
           this.$message({
             message: '品种合约及方向不能为空!',
             message: '品种合约及方向不能为空!',
             type: 'warning',
             type: 'warning',
@@ -343,8 +345,8 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].varietyContractDirection.length < 1 ||
-          this.deptBudgetList[i].varietyContractDirection.length > 20
+          this.deptBudgetList.varietyContractDirection.length < 1 ||
+          this.deptBudgetList.varietyContractDirection.length > 20
         ) {
         ) {
           this.$message({
           this.$message({
             message: '品种合约及方向输入错误!',
             message: '品种合约及方向输入错误!',
@@ -352,7 +354,7 @@ export default {
           })
           })
           return
           return
         }
         }
-        if (!this.deptBudgetList[i].buyer) {
+        if (!this.deptBudgetList.buyer) {
           this.$message({
           this.$message({
             message: '买方联络人不能为空!',
             message: '买方联络人不能为空!',
             type: 'warning',
             type: 'warning',
@@ -360,8 +362,8 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].buyer.length < 2 ||
-          this.deptBudgetList[i].buyer.length > 20
+          this.deptBudgetList.buyer.length < 2 ||
+          this.deptBudgetList.buyer.length > 20
         ) {
         ) {
           this.$message({
           this.$message({
             message: '买方联络人姓名输入错误!',
             message: '买方联络人姓名输入错误!',
@@ -369,7 +371,7 @@ export default {
           })
           })
           return
           return
         }
         }
-        if (!this.deptBudgetList[i].buyerPhone) {
+        if (!this.deptBudgetList.buyerPhone) {
           this.$message({
           this.$message({
             message: '买方联络人电话不能为空!',
             message: '买方联络人电话不能为空!',
             type: 'warning',
             type: 'warning',
@@ -377,8 +379,8 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].buyerPhone.length < 7 ||
-          this.deptBudgetList[i].buyerPhone.length > 20
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
         ) {
         ) {
           this.$message({
           this.$message({
             message: '买方联络人电话输入错误!',
             message: '买方联络人电话输入错误!',
@@ -386,14 +388,14 @@ export default {
           })
           })
           return
           return
         }
         }
-        if (isNaN(this.deptBudgetList[i].buyerPhone)) {
+        if (isNaN(this.deptBudgetList.buyerPhone)) {
           this.$message({
           this.$message({
             message: '卖方联络人电话输入有误!',
             message: '卖方联络人电话输入有误!',
             type: 'warning',
             type: 'warning',
           })
           })
           return
           return
         }
         }
-        if (!this.deptBudgetList[i].seller) {
+        if (!this.deptBudgetList.seller) {
           this.$message({
           this.$message({
             message: '卖方联络人不能为空!',
             message: '卖方联络人不能为空!',
             type: 'warning',
             type: 'warning',
@@ -401,8 +403,8 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].seller.length < 2 ||
-          this.deptBudgetList[i].seller.length > 20
+          this.deptBudgetList.seller.length < 2 ||
+          this.deptBudgetList.seller.length > 20
         ) {
         ) {
           this.$message({
           this.$message({
             message: '卖方联络人姓名输入错误!',
             message: '卖方联络人姓名输入错误!',
@@ -411,14 +413,14 @@ export default {
           return
           return
         }
         }
 
 
-        if (!this.deptBudgetList[i].sellerPhone) {
+        if (!this.deptBudgetList.sellerPhone) {
           this.$message({
           this.$message({
             message: '卖方联络人电话不能为空!',
             message: '卖方联络人电话不能为空!',
             type: 'warning',
             type: 'warning',
           })
           })
           return
           return
         }
         }
-        if (isNaN(this.deptBudgetList[i].sellerPhone)) {
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
           this.$message({
           this.$message({
             message: '卖方联络人电话输入有误!',
             message: '卖方联络人电话输入有误!',
             type: 'warning',
             type: 'warning',
@@ -426,8 +428,8 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].sellerPhone.length < 7 ||
-          this.deptBudgetList[i].sellerPhone.length > 20
+          this.deptBudgetList.sellerPhone.length < 7 ||
+          this.deptBudgetList.sellerPhone.length > 20
         ) {
         ) {
           this.$message({
           this.$message({
             message: '卖方联络人电话输入有误!',
             message: '卖方联络人电话输入有误!',
@@ -435,7 +437,7 @@ export default {
           })
           })
           return
           return
         }
         }
-        if (!this.deptBudgetList[i].transactionsNumberHand) {
+        if (!this.deptBudgetList.transactionsNumberHand) {
           this.$message({
           this.$message({
             message: '成交数量不能为空!',
             message: '成交数量不能为空!',
             type: 'warning',
             type: 'warning',
@@ -444,17 +446,17 @@ export default {
         }
         }
 
 
         if (
         if (
-          isNaN(this.deptBudgetList[i].transactionsNumberHand) ||
-          (String(this.deptBudgetList[i].transactionsNumberHand).indexOf('.') !=
+          isNaN(this.deptBudgetList.transactionsNumberHand) ||
+          (String(this.deptBudgetList.transactionsNumberHand).indexOf('.') !=
             -1 &&
             -1 &&
-            String(this.deptBudgetList[i].transactionsNumberHand).length -
-              (String(this.deptBudgetList[i].transactionsNumberHand).indexOf(
+            String(this.deptBudgetList.transactionsNumberHand).length -
+              (String(this.deptBudgetList.transactionsNumberHand).indexOf(
                 '.'
                 '.'
               ) +
               ) +
                 1) >
                 1) >
               2) ||
               2) ||
-          this.deptBudgetList[i].transactionsNumberHand < 1 ||
-          this.deptBudgetList[i].transactionsNumberHand > 10000
+          this.deptBudgetList.transactionsNumberHand < 1 ||
+          this.deptBudgetList.transactionsNumberHand > 10000
         ) {
         ) {
           this.$message({
           this.$message({
             message: '输入成交数量有误!',
             message: '输入成交数量有误!',
@@ -463,11 +465,11 @@ export default {
           return
           return
         }
         }
         if (
         if (
-          this.deptBudgetList[i].transactionPrice < 0 ||
-          this.deptBudgetList[i].transactionPrice > 100000000 ||
-          (String(this.deptBudgetList[i].transactionPrice).indexOf('.') != -1 &&
-            String(this.deptBudgetList[i].transactionPrice).length -
-              (String(this.deptBudgetList[i].transactionPrice).indexOf('.') +
+          this.deptBudgetList.transactionPrice < 0 ||
+          this.deptBudgetList.transactionPrice > 100000000 ||
+          (String(this.deptBudgetList.transactionPrice).indexOf('.') != -1 &&
+            String(this.deptBudgetList.transactionPrice).length -
+              (String(this.deptBudgetList.transactionPrice).indexOf('.') +
                 1) >
                 1) >
               2)
               2)
         ) {
         ) {
@@ -477,8 +479,8 @@ export default {
           })
           })
           return
           return
         }
         }
-        if (this.deptBudgetList[i].transactionPrice) {
-          if (isNaN(this.deptBudgetList[i].transactionPrice)) {
+        if (this.deptBudgetList.transactionPrice) {
+          if (isNaN(this.deptBudgetList.transactionPrice)) {
             this.$message({
             this.$message({
               message: '成交价格输入错误!',
               message: '成交价格输入错误!',
               type: 'warning',
               type: 'warning',
@@ -486,14 +488,14 @@ export default {
             return
             return
           }
           }
         }
         }
-        if (!this.deptBudgetList[i].transactionPrice) {
+        if (!this.deptBudgetList.transactionPrice) {
           this.$message({
           this.$message({
             message: '成交价格不能为空!',
             message: '成交价格不能为空!',
             type: 'warning',
             type: 'warning',
           })
           })
           return
           return
         }
         }
-        if (!this.deptBudgetList[i].transactionDate) {
+        if (!this.deptBudgetList.transactionDate) {
           this.$message({
           this.$message({
             message: '成交日期不能为空!',
             message: '成交日期不能为空!',
             type: 'warning',
             type: 'warning',
@@ -503,9 +505,8 @@ export default {
       }
       }
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
-      this.deptBudgetList.enclosureTypeFlag = '0'
+      this.deptBudgetList.addressUrl = this.addressUrls.toString(),
       this.priceConfirmationSheet = this.deptBudgetList
       this.priceConfirmationSheet = this.deptBudgetList
-      // for()
       this.$confirm(`确定提交确认单信息`, {
       this.$confirm(`确定提交确认单信息`, {
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         confirmButtonText: '确定',

+ 218 - 7
src/views/financialManagement/collectionManagementList.vue

@@ -3,6 +3,7 @@
   <div class="container">
   <div class="container">
     <!-- <div> -->
     <!-- <div> -->
     <div>
     <div>
+      
       <ws-input
       <ws-input
         v-model="searchKeyWord"
         v-model="searchKeyWord"
         placeholder="可按照合同编号和任务编号进行查找"
         placeholder="可按照合同编号和任务编号进行查找"
@@ -25,6 +26,7 @@
           alt
           alt
         />
         />
       </ws-button>
       </ws-button>
+      
     </div>
     </div>
     <ws-button  @click="handleAdd()">全部</ws-button>
     <ws-button  @click="handleAdd()">全部</ws-button>
     <ws-button  @click="handleAdd()">待回款</ws-button>
     <ws-button  @click="handleAdd()">待回款</ws-button>
@@ -45,19 +47,75 @@
       <el-table-column class="table_td" prop="receiveWarehouse" label="出货量(吨)"></el-table-column>
       <el-table-column class="table_td" prop="receiveWarehouse" label="出货量(吨)"></el-table-column>
       <el-table-column class="table_td" prop="" label="已开发票(元)"></el-table-column>
       <el-table-column class="table_td" prop="" label="已开发票(元)"></el-table-column>
       <el-table-column class="table_td" prop="" label="未开发票(元)"></el-table-column>
       <el-table-column class="table_td" prop="" label="未开发票(元)"></el-table-column>
-      <el-table-column class="table_td" prop="" label="状态"></el-table-column>
+      <el-table-column class="table_td" prop="" label="状态">
+        <template slot-scope="scope">
+          <el-popover
+            placement="left"
+            :width="285"
+            trigger="click"
+            visible-arrow="false"
+            @show="history(scope.row)"
+          >
+            <template>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
+            </template>
+            <div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div
+                v-for="(item, index) in historyList"
+                :key="index"
+                class="flex"
+              >
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
+                <div class="vertical-text">
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+                </div>
+              </div>
+            </div>
+          </el-popover>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
+        </template>
+      </el-table-column>
       <el-table-column class="table_td" prop="" label="更新时间"></el-table-column>
       <el-table-column class="table_td" prop="" label="更新时间"></el-table-column>
       <el-table-column prop="seller" label="操作" >
       <el-table-column prop="seller" label="操作" >
         <template slot-scope="scope">
         <template slot-scope="scope">
           <div class="record" @click="dialogFormVisible2=true">派发</div>
           <div class="record" @click="dialogFormVisible2=true">派发</div>
-            <el-dialog
-            width="40%"
+             <el-dialog
+            width="60%"
             title="派发(123)"
             title="派发(123)"
             :visible.sync="dialogFormVisible2"
             :visible.sync="dialogFormVisible2"
             :append-to-body="true"
             :append-to-body="true"
           >
           >
-            <el-form :model="form">
-              <el-form-item label="默认库管" :label-width="formLabelWidth">
+            <el-form :model="form" >
+                  <el-form-item label="默认库管" :label-width="formLabelWidth">
                 <el-select
                 <el-select
                   v-model="form.region"
                   v-model="form.region"
                   autocomplete="off"
                   autocomplete="off"
@@ -65,7 +123,82 @@
                   class="deal"
                   class="deal"
                 ></el-select>
                 ></el-select>
               </el-form-item>
               </el-form-item>
-             
+              <el-form-item label="编号" :label-width="formLabelWidth">
+               
+              </el-form-item>
+              <el-form-item label="车牌号" :label-width="formLabelWidth" class="car">
+               <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder="请输入车牌号"
+                  class="deall"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="箱号" :label-width="formLabelWidth" class="boxno">
+                <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder="请输入箱号"
+                  class="dealll"
+                ></el-input>
+              </el-form-item>
+               <el-form-item label="封号" :label-width="formLabelWidth" class="fengno">
+                <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder="请输入封号"
+                  class="dea"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="库管" :label-width="formLabelWidth" class="kug">
+                <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder=""
+                  class="deaa"
+                ></el-input>
+              </el-form-item>
+              <el-button class="bot" @click="add()">新增</el-button>
+              <hr>
+              <!-- <el-form v-for="(item , index) in lists" :Key="index">
+              <el-form-item label="编号" :label-width="formLabelWidth">
+               
+              </el-form-item>
+              <el-form-item label="车牌号" :label-width="formLabelWidth" class="car">
+               <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder="请输入车牌号"
+                  class="deall"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="箱号" :label-width="formLabelWidth" class="boxno">
+                <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder="请输入箱号"
+                  class="dealll"
+                ></el-input>
+              </el-form-item>
+               <el-form-item label="封号" :label-width="formLabelWidth" class="fengno">
+                <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder="请输入封号"
+                  class="dea"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="库管" :label-width="formLabelWidth" class="kug">
+                <el-input
+                  v-model="form.region"
+                  autocomplete="off"
+                  placeholder=""
+                  class="deaa"
+                ></el-input>
+              </el-form-item>
+              <el-button class="bot" @click="add()">删除</el-button>
+              <hr>
+            </el-form> -->
             </el-form>
             </el-form>
           </el-dialog>
           </el-dialog>
         </template>
         </template>
@@ -186,7 +319,13 @@ export default {
       this.searchType = state
       this.searchType = state
       this.getList()
       this.getList()
     },
     },
-    
+    add() {
+      this.freightspace.push({
+        // binNumber: '',
+        // maxStorage: '',
+        // remark: '',
+      })
+    },
     //编辑
     //编辑
     handleEdit(row) {
     handleEdit(row) {
       this.$router.push({
       this.$router.push({
@@ -225,6 +364,36 @@ export default {
         }
         }
       })
       })
     },
     },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待回款' || row.status == '已回款') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      this.$confirm(`是否将状态改为${status}`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     //添加
     //添加
     // handleAdd(){
     // handleAdd(){
     //   this.$router.push({
     //   this.$router.push({
@@ -381,6 +550,7 @@ export default {
           this.historyList = response
           this.historyList = response
         })
         })
     },
     },
+    
     //查找
     //查找
     find() {
     find() {
       this.currentPage = 1
       this.currentPage = 1
@@ -622,4 +792,45 @@ export default {
 .el-table .el-table__body .cell {
 .el-table .el-table__body .cell {
   text-align: center;
   text-align: center;
 }
 }
+.deall {
+    margin-top: 6%;
+    margin-left: -9%;
+    width: 120px;
+}
+.car{
+  margin-top: -57px;
+}
+.boxno {
+    margin-top: -188px;
+    margin-left: 25%;
+}
+.dealll{
+  margin-top: 17.6%;
+  margin-left: -13.2%;
+  width: 120px;
+}
+.fengno {
+    margin-top: -18%;
+    margin-left: 31%;
+}
+ .dea {
+    margin-top: 22%;
+    margin-left: -9.2%;
+    width: 120px;
+}
+.kug[data-v-8b5eee48] {
+    /* margin-top: -14%; */
+    margin-left: 50%;
+    width: 120px;
+    margin-top: -121px;
+}
+.deaa {
+   width: 120px;
+    margin-top: 62px;
+    margin-left: -66px;
+}
+.bot{
+  margin-left: 76%;
+  margin-top: -7px;
+}
 </style>
 </style>

+ 5 - 30
src/views/purchasingManagement/procurementPlanAdd.vue

@@ -81,10 +81,10 @@
             v-show="dataList.procurementPlanType=='现货'"
             v-show="dataList.procurementPlanType=='现货'"
             label="采购价格(元)"
             label="采购价格(元)"
             span="1"
             span="1"
-            prop="unitPrice"
+            prop="procurementPrice"
           >
           >
             <el-input
             <el-input
-              v-model="dataList.unitPrice"
+              v-model="dataList.procurementPrice"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
               placeholder="请输入采购价格"
               placeholder="请输入采购价格"
@@ -258,13 +258,9 @@
 <script>
 <script>
 import { procurementAdd } from '@/model/purchasingManagement/index'
 import { procurementAdd } from '@/model/purchasingManagement/index'
 import { regionData,provinceAndCityDataPlus, CodeToText, TextToCode } from 'element-china-area-data'
 import { regionData,provinceAndCityDataPlus, CodeToText, TextToCode } from 'element-china-area-data'
-import { pullDown } from '@/model/warehouse/index'
 import { packList } from '@/model/contarct/index'
 import { packList } from '@/model/contarct/index'
 import { getwarehousename } from '@/model/tasksport/index'
 import { getwarehousename } from '@/model/tasksport/index'
-import { getstaff } from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
-import { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
@@ -606,13 +602,6 @@ export default {
       return arr.join('')
       return arr.join('')
     },
     },
     submit() {
     submit() {
-      // if(!this.dataList.goodName) {
-      //   this.$message({
-      //     message:'货名不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
       if (!this.dataList.title) {
       if (!this.dataList.title) {
         this.$message({
         this.$message({
           message: '标题不能为空!',
           message: '标题不能为空!',
@@ -672,20 +661,6 @@ export default {
         })
         })
         return
         return
       }
       }
-      // if(!this.dataList.receiveWarehouse) {
-      //   this.$message({
-      //     message:'收货库不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
-      // if(!this.dataList.freightPayer) {
-      //   this.$message({
-      //     message:'运费承担方不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
       if (!this.dataList.buyer) {
       if (!this.dataList.buyer) {
         this.$message({
         this.$message({
           message: '买方不能为空!',
           message: '买方不能为空!',
@@ -815,9 +790,9 @@ export default {
               this.dataList.procurementPlanNo='CGJH'+this.getdate()+this.verifyinit()
               this.dataList.procurementPlanNo='CGJH'+this.getdate()+this.verifyinit()
               this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
               this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
               this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
               this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
- this.dataList.receivePrivate =  CodeToText[this.selectedOptions[0]]
- this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
- this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
+              this.dataList.receivePrivate =  CodeToText[this.selectedOptions[0]]
+              this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
+              this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
               this.dataList.outputPrivate =
               this.dataList.outputPrivate =
                 CodeToText[this.selectedOptions1[0]]
                 CodeToText[this.selectedOptions1[0]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]

+ 147 - 125
src/views/purchasingManagement/procurementPlanEdit.vue

@@ -6,7 +6,12 @@
         <h2 class="bg-left title">编辑采购计划</h2>
         <h2 class="bg-left title">编辑采购计划</h2>
       </el-col>
       </el-col>
       <el-col :span="12" class="bg-right">
       <el-col :span="12" class="bg-right">
-        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+        >
           <img
           <img
             width="6"
             width="6"
             height="10"
             height="10"
@@ -26,7 +31,11 @@
         <el-form ref="dataList" :model="dataList" label-width="140px">
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
           <!-- 标题 -->
           <ws-form-item label="标题" span="1" prop="title">
           <ws-form-item label="标题" span="1" prop="title">
-            <el-input v-model="dataList.title" maxlength="16" placeholder="请输入标题,不超过16个字" />
+            <el-input
+              v-model="dataList.title"
+              maxlength="16"
+              placeholder="请输入标题,不超过16个字"
+            />
           </ws-form-item>
           </ws-form-item>
           <!-- 货名 -->
           <!-- 货名 -->
           <ws-form-item label="货名" span="1" prop="goodsName">
           <ws-form-item label="货名" span="1" prop="goodsName">
@@ -46,7 +55,11 @@
             </ws-select>
             </ws-select>
           </ws-form-item>
           </ws-form-item>
           <!-- 计划采购量(吨) -->
           <!-- 计划采购量(吨) -->
-          <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume">
+          <ws-form-item
+            label="计划采购量(吨)"
+            span="1"
+            prop="plannedPurchaseVolume"
+          >
             <el-input
             <el-input
               v-model="dataList.plannedPurchaseVolume"
               v-model="dataList.plannedPurchaseVolume"
               class="typeselect"
               class="typeselect"
@@ -55,7 +68,10 @@
           </ws-form-item>
           </ws-form-item>
           <!-- 最小成交量 -->
           <!-- 最小成交量 -->
           <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
           <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
-            <el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" />
+            <el-input
+              v-model="dataList.minimumVolume"
+              placeholder="请输入最小成交量"
+            />
           </ws-form-item>
           </ws-form-item>
           <!--类型-->
           <!--类型-->
           <ws-form-item label="类型" span="1" prop="procurementPlanType">
           <ws-form-item label="类型" span="1" prop="procurementPlanType">
@@ -80,7 +96,7 @@
           </ws-form-item>
           </ws-form-item>
           <!-- 基差 -->
           <!-- 基差 -->
           <ws-form-item
           <ws-form-item
-            v-show="dataList.procurementPlanType=='期货'"
+            v-show="dataList.procurementPlanType == '期货'"
             label="基差(元/吨)"
             label="基差(元/吨)"
             span="1"
             span="1"
             prop="basisPrice"
             prop="basisPrice"
@@ -89,7 +105,7 @@
           </ws-form-item>
           </ws-form-item>
           <!--采购价格(元)-->
           <!--采购价格(元)-->
           <ws-form-item
           <ws-form-item
-            v-show="dataList.procurementPlanType=='现货'"
+            v-show="dataList.procurementPlanType == '现货'"
             label="采购价格(元)"
             label="采购价格(元)"
             span="1"
             span="1"
             prop="procurementPrice"
             prop="procurementPrice"
@@ -108,7 +124,6 @@
               v-model="dataList.receiveWarehouse"
               v-model="dataList.receiveWarehouse"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
-              
             />
             />
             <el-option
             <el-option
               v-for="item in warehouseList1"
               v-for="item in warehouseList1"
@@ -126,7 +141,7 @@
               size="large"
               size="large"
               placeholder="请选择收货库所在地区"
               placeholder="请选择收货库所在地区"
               @change="handleChange"
               @change="handleChange"
-              style="width:200%"
+              style="width: 200%"
             />
             />
           </ws-form-item>
           </ws-form-item>
           <!--运费承担方-->
           <!--运费承担方-->
@@ -162,7 +177,12 @@
             </ws-select>
             </ws-select>
           </ws-form-item>
           </ws-form-item>
           <!--装袋备注=-->
           <!--装袋备注=-->
-          <el-form-item label="装袋备注" span="1" prop="baggingNotes">
+          <el-form-item
+            v-if="dataList.packingType != '散装'"
+            label="装袋备注"
+            span="1"
+            prop="baggingNotes"
+          >
             <el-input
             <el-input
               v-model="dataList.baggingNotes"
               v-model="dataList.baggingNotes"
               size="small"
               size="small"
@@ -171,7 +191,12 @@
           </el-form-item>
           </el-form-item>
           <!-- 买方 -->
           <!-- 买方 -->
           <ws-form-item label="买方" span="1" prop="buyer">
           <ws-form-item label="买方" span="1" prop="buyer">
-            <el-input v-model="dataList.buyer" maxlength="120" size="small" placeholder="请输入买方名称" />
+            <el-input
+              v-model="dataList.buyer"
+              maxlength="120"
+              size="small"
+              placeholder="请输入买方名称"
+            />
           </ws-form-item>
           </ws-form-item>
           <!-- 买方电话 -->
           <!-- 买方电话 -->
           <el-form-item label="买方电话" span="1" prop="buyerPhone">
           <el-form-item label="买方电话" span="1" prop="buyerPhone">
@@ -191,32 +216,59 @@
         </div>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <el-form-item label="水分(%)<=" span="1" prop="waterContent">
           <el-form-item label="水分(%)<=" span="1" prop="waterContent">
-            <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
+            <el-input
+              v-model="dataList.waterContent"
+              class="typeselect"
+              placeholder="请输入水分占比"
+            />
           </el-form-item>
           </el-form-item>
 
 
           <!-- 容重 -->
           <!-- 容重 -->
           <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
           <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
-            <el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
+            <el-input
+              v-model="dataList.bulkDensity"
+              class="typeselect"
+              placeholder="请输入容重"
+            />
           </el-form-item>
           </el-form-item>
           <!-- 热损伤 -->
           <!-- 热损伤 -->
           <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
           <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
-            <el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
+            <el-input
+              v-model="dataList.jiaorenli"
+              class="typeselect"
+              placeholder="请输入热损伤占比"
+            />
           </el-form-item>
           </el-form-item>
           <!-- 杂质 -->
           <!-- 杂质 -->
           <el-form-item label="杂质(%)<=" span="1" prop="impurity">
           <el-form-item label="杂质(%)<=" span="1" prop="impurity">
-            <el-input v-model="dataList.impurity" class="typeselect" placeholder="请输入杂质占比" />
+            <el-input
+              v-model="dataList.impurity"
+              class="typeselect"
+              placeholder="请输入杂质占比"
+            />
           </el-form-item>
           </el-form-item>
           <!-- 霉变粒 -->
           <!-- 霉变粒 -->
           <el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
           <el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
-            <el-input v-model="dataList.mildewGrain" placeholder="请输入霉变粒占比" />
+            <el-input
+              v-model="dataList.mildewGrain"
+              placeholder="请输入霉变粒占比"
+            />
           </el-form-item>
           </el-form-item>
           <!--不完善粒(%)<=-->
           <!--不完善粒(%)<=-->
           <el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
           <el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
-            <el-input v-model="dataList.imperfectGrain" maxlength="120" placeholder="请输入不完善粒占比" />
+            <el-input
+              v-model="dataList.imperfectGrain"
+              maxlength="120"
+              placeholder="请输入不完善粒占比"
+            />
           </el-form-item>
           </el-form-item>
           <!-- 蛋白(%)<= -->
           <!-- 蛋白(%)<= -->
           <el-form-item label="蛋白(%)<=" span="1" prop="protein">
           <el-form-item label="蛋白(%)<=" span="1" prop="protein">
-            <el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
+            <el-input
+              v-model="dataList.protein"
+              class="typeselect"
+              placeholder="请输入蛋白占比"
+            />
           </el-form-item>
           </el-form-item>
           <!--粒型-->
           <!--粒型-->
           <ws-form-item label="粒型" span="1" prop="grain">
           <ws-form-item label="粒型" span="1" prop="grain">
@@ -252,15 +304,6 @@
           </ws-form-item>
           </ws-form-item>
           <!--产地-->
           <!--产地-->
           <ws-form-item label="产地" span="1" prop="unitPrice">
           <ws-form-item label="产地" span="1" prop="unitPrice">
-            <!-- <el-cascader
-              :options="options_"
-              v-model="selectedOptions1"
-              clearable
-              size="large"
-              placeholder="请选择产地"
-              @change="handleChange1"
-              style="width:200%"
-            /> -->
             <el-cascader
             <el-cascader
               :options="options1_"
               :options="options1_"
               v-model="selectedOptions1"
               v-model="selectedOptions1"
@@ -268,13 +311,12 @@
               size="large"
               size="large"
               placeholder="请选择产地"
               placeholder="请选择产地"
               @change="handleChange1"
               @change="handleChange1"
-              style="width:200%"
+              style="width: 200%"
             />
             />
           </ws-form-item>
           </ws-form-item>
           <!--产出年份-->
           <!--产出年份-->
           <el-form-item label="产出年份" span="1" prop="outputYear">
           <el-form-item label="产出年份" span="1" prop="outputYear">
-
-        <el-date-picker
+            <el-date-picker
               v-model="dataList.outputYear"
               v-model="dataList.outputYear"
               type="year"
               type="year"
               align="right"
               align="right"
@@ -288,18 +330,24 @@
     </div>
     </div>
     <!-- 提交 -->
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
+        >提交</el-button
+      >
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { procurementLook , procurementEdit } from '@/model/purchasingManagement/index'
-import { regionData, CodeToText, TextToCode ,provinceAndCityDataPlus} from 'element-china-area-data'
-import { pullDown } from '@/model/warehouse/index'
+import {
+  procurementLook,
+  procurementEdit,
+} from '@/model/purchasingManagement/index'
+import {
+  regionData,
+  CodeToText,
+  TextToCode,
+  provinceAndCityDataPlus,
+} from 'element-china-area-data'
 import { packList } from '@/model/contarct/index'
 import { packList } from '@/model/contarct/index'
-import {  getwarehousename } from '@/model/tasksport/index'
-import { getstaff } from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import { mapActions, mapGetters, mapState } from 'vuex'
 import { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
@@ -309,7 +357,7 @@ export default {
   name: 'viewSpareMoney',
   name: 'viewSpareMoney',
   components: {
   components: {
     WsUpload,
     WsUpload,
-    Pagination
+    Pagination,
   },
   },
   watch: {
   watch: {
     // vesselId(val) {
     // vesselId(val) {
@@ -317,10 +365,10 @@ export default {
     // },
     // },
     isShow(val) {
     isShow(val) {
       this.showType = val
       this.showType = val
-    }
+    },
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['dataList'])
+    ...mapGetters(['dataList']),
   },
   },
   data() {
   data() {
     return {
     return {
@@ -335,8 +383,8 @@ export default {
       showType: true,
       showType: true,
       // 年
       // 年
       year: '',
       year: '',
-     options1_: provinceAndCityDataPlus,
-       options_: regionData,
+      options1_: provinceAndCityDataPlus,
+      options_: regionData,
       packingTypeList: '',
       packingTypeList: '',
       procurementPlanTypeList: '',
       procurementPlanTypeList: '',
       freightPayerList: '',
       freightPayerList: '',
@@ -349,7 +397,7 @@ export default {
       currentPage: 1,
       currentPage: 1,
       pageSize: 10,
       pageSize: 10,
       searchType: 1,
       searchType: 1,
-      warehouseList1:[],
+      warehouseList1: [],
       searchKeyWord: '',
       searchKeyWord: '',
       radio: '1',
       radio: '1',
       contractType: 2,
       contractType: 2,
@@ -359,7 +407,7 @@ export default {
       grainList: [],
       grainList: [],
       checked: true,
       checked: true,
       form: {},
       form: {},
-       pcFlag:1,
+      pcFlag: 1,
       staffList: [],
       staffList: [],
       options: [],
       options: [],
       storageType: [],
       storageType: [],
@@ -384,19 +432,19 @@ export default {
             required: true,
             required: true,
             type: 'number',
             type: 'number',
             message: '请输入活动名称',
             message: '请输入活动名称',
-            trigger: 'blur'
-          }
-        ]
+            trigger: 'blur',
+          },
+        ],
       },
       },
 
 
-     outputYear: [],
+      outputYear: [],
       size: 10,
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       deptCircularPage: {},
       packtypeList: {},
       packtypeList: {},
       date: {
       date: {
         year: dayjs().format('YYYY'),
         year: dayjs().format('YYYY'),
-        month: dayjs().format('MM')
+        month: dayjs().format('MM'),
       },
       },
       contractList: [],
       contractList: [],
       inOutTaskNo: '',
       inOutTaskNo: '',
@@ -404,11 +452,11 @@ export default {
       dataList1: { taskTypeKey: '1' },
       dataList1: { taskTypeKey: '1' },
       historyList: [],
       historyList: [],
       pickerBeginDateBefore: {
       pickerBeginDateBefore: {
-        disabledDate: time => {
+        disabledDate: (time) => {
           return time.getTime() > Date.now()
           return time.getTime() > Date.now()
-        }
+        },
       },
       },
-      accessoryTFs: false
+      accessoryTFs: false,
     }
     }
   },
   },
   activated() {
   activated() {
@@ -448,7 +496,7 @@ export default {
         if (i > 90 && i < 97) continue
         if (i > 90 && i < 97) continue
         arr.push(String.fromCharCode(i))
         arr.push(String.fromCharCode(i))
       }
       }
-      arr.sort(function() {
+      arr.sort(function () {
         return Math.random() - 0.5
         return Math.random() - 0.5
       })
       })
       arr.length = 4
       arr.length = 4
@@ -460,7 +508,7 @@ export default {
       this.deptBudgetList.staffList = val
       this.deptBudgetList.staffList = val
       if (val) {
       if (val) {
         //val存在
         //val存在
-        this.options = this.staffList.filter(item => {
+        this.options = this.staffList.filter((item) => {
           if (
           if (
             !!~item.staffName.indexOf(val) ||
             !!~item.staffName.indexOf(val) ||
             !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
             !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
@@ -473,7 +521,7 @@ export default {
         this.options = this.staffList
         this.options = this.staffList
       }
       }
     },
     },
-    
+
     selecttaskType(e) {
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
         if (this.taskTypeList[i].value == e) {
         if (this.taskTypeList[i].value == e) {
@@ -526,9 +574,8 @@ export default {
     selectprocurementPlanType(e) {
     selectprocurementPlanType(e) {
       for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
       for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
         if (this.procurementPlanTypeList[i].constValue == e) {
         if (this.procurementPlanTypeList[i].constValue == e) {
-          this.dataList.procurementPlanTypekey = this.procurementPlanTypeList[
-            i
-          ].constKey
+          this.dataList.procurementPlanTypekey =
+            this.procurementPlanTypeList[i].constKey
         }
         }
       }
       }
     },
     },
@@ -558,78 +605,71 @@ export default {
     close() {
     close() {
       this.$router.push({ path: 'procurementPlanList' })
       this.$router.push({ path: 'procurementPlanList' })
     },
     },
-    
+
     loaddata() {
     loaddata() {
-       procurementLook({ id: this.$route.query.id })
+      procurementLook({ id: this.$route.query.id })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
           this.dataList = response
           this.dataList = response
-          var tmp =[]
+          var tmp = []
           tmp[0] = TextToCode[this.dataList.receivePrivate].code
           tmp[0] = TextToCode[this.dataList.receivePrivate].code
           tmp[1] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity].code
           tmp[1] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity].code
           tmp[2] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity][this.dataList.receiveArea].code
           tmp[2] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity][this.dataList.receiveArea].code
           this.selectedOptions = tmp
           this.selectedOptions = tmp
-            var tmp1 =[]
-              tmp1[0] = TextToCode[this.dataList.outputPrivate].code
+          var tmp1 = []
+          tmp1[0] = TextToCode[this.dataList.outputPrivate].code
           tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
           tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
-            this.selectedOptions1 = tmp1
+          this.selectedOptions1 = tmp1
         })
         })
       // 货名
       // 货名
       packList({ constId: 'CON2' })
       packList({ constId: 'CON2' })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.goodnameList = response
           this.goodnameList = response
         })
         })
       // 品级
       // 品级
       packList({ constId: 'CON3' })
       packList({ constId: 'CON3' })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.gradeList = response
           this.gradeList = response
         })
         })
       //粒形
       //粒形
       packList({ constId: 'PRO4' })
       packList({ constId: 'PRO4' })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.grainList = response
           this.grainList = response
         })
         })
       //类型
       //类型
       packList({ constId: 'PRO1' })
       packList({ constId: 'PRO1' })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.procurementPlanTypeList = response
           this.procurementPlanTypeList = response
         })
         })
       //包装方式
       //包装方式
       packList({ constId: 'PRO2' })
       packList({ constId: 'PRO2' })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.packingTypeList = response
           this.packingTypeList = response
         })
         })
       //运费承担方
       //运费承担方
       packList({ constId: 'PRO3' })
       packList({ constId: 'PRO3' })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.freightPayerList = response
           this.freightPayerList = response
         })
         })
     },
     },
     submit() {
     submit() {
-      // if(!this.dataList.goodName) {
-      //   this.$message({
-      //     message:'货名不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
       if (!this.dataList.title) {
       if (!this.dataList.title) {
         this.$message({
         this.$message({
           message: '标题不能为空',
           message: '标题不能为空',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
       if (!this.dataList.plannedPurchaseVolume) {
       if (!this.dataList.plannedPurchaseVolume) {
         this.$message({
         this.$message({
           message: '计划采购量不能为空',
           message: '计划采购量不能为空',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -642,56 +682,42 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '最小交易量输入错误',
           message: '最小交易量输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
       if (!this.dataList.procurementPlanType) {
       if (!this.dataList.procurementPlanType) {
         this.$message({
         this.$message({
           message: '类型不能为空',
           message: '类型不能为空',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
-      // if(!this.dataList.receiveWarehouse) {
-      //   this.$message({
-      //     message:'收货库不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
-      // if(!this.dataList.freightPayer) {
-      //   this.$message({
-      //     message:'运费承担方不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
       if (!this.dataList.packingType) {
       if (!this.dataList.packingType) {
         this.$message({
         this.$message({
           message: '包装方式不能为空',
           message: '包装方式不能为空',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
       if (!this.dataList.buyer) {
       if (!this.dataList.buyer) {
         this.$message({
         this.$message({
           message: '买方不能为空',
           message: '买方不能为空',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
       if (!this.dataList.buyerPhone) {
       if (!this.dataList.buyerPhone) {
         this.$message({
         this.$message({
           message: '请输入买方电话!',
           message: '请输入买方电话!',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
       if (isNaN(this.dataList.buyerPhone)) {
       if (isNaN(this.dataList.buyerPhone)) {
         this.$message({
         this.$message({
           message: '输入买方电话有误!',
           message: '输入买方电话有误!',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -701,14 +727,14 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '买方电话输入错误',
           message: '买方电话输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
       if (!this.dataList.waterContent) {
       if (!this.dataList.waterContent) {
         this.$message({
         this.$message({
           message: '水分不能为空',
           message: '水分不能为空',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -721,7 +747,7 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '容重输入错误',
           message: '容重输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -734,7 +760,7 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '杂质输入错误',
           message: '杂质输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -747,7 +773,7 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '霉变粒输入错误',
           message: '霉变粒输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -760,7 +786,7 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '热损伤输入错误',
           message: '热损伤输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -773,7 +799,7 @@ export default {
       ) {
       ) {
         this.$message({
         this.$message({
           message: '不完整粒输入错误',
           message: '不完整粒输入错误',
-          type: 'warning'
+          type: 'warning',
         })
         })
         return
         return
       }
       }
@@ -782,32 +808,29 @@ export default {
       this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
       this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         confirmButtonText: '确定',
-        type: 'warning'
+        type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
-          this.$refs.dataList.validate(valid => {
-
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
             if (valid) {
-          this.dataList.sourceProvince =
-            CodeToText[this.selectedOptions[0]]
-          this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
+              // this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
+              // this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
 
 
-          this.dataList.receivePrivate =  CodeToText[this.selectedOptions[0]]
- this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
- this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
-              this.dataList.outputPrivate =
-                CodeToText[this.selectedOptions1[0]]
+              this.dataList.receivePrivate = CodeToText[this.selectedOptions[0]]
+              this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
+              this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
+              this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-            
-          this.dataList.compId = this.compId
-          // this.dataList.pcFlag = 1
+
+              this.dataList.compId = this.compId
+              // this.dataList.pcFlag = 1
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
 
 
               procurementEdit(this.dataList)
               procurementEdit(this.dataList)
                 .toPromise()
                 .toPromise()
-                .then(response => {
-                  this.$message.success('添加成功')
-                  
+                .then((response) => {
+                  this.$message.success('编辑成功')
+
                   this.$router.push({ path: 'procurementPlanList' })
                   this.$router.push({ path: 'procurementPlanList' })
                 })
                 })
             } else {
             } else {
@@ -889,8 +912,8 @@ export default {
     listQuery() {},
     listQuery() {},
     total() {},
     total() {},
     clearfiltQuery() {},
     clearfiltQuery() {},
-    selectCrtDuty() {}
-  }
+    selectCrtDuty() {},
+  },
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
@@ -921,7 +944,6 @@ export default {
       align-items: center;
       align-items: center;
       text-align: left;
       text-align: left;
       overflow: hidden;
       overflow: hidden;
-      
     }
     }
   }
   }
 }
 }

+ 5 - 2
src/views/purchasingManagement/procurementPlanList.vue

@@ -1,10 +1,12 @@
 //采购计划
 //采购计划
 <template>
 <template>
   <div class="container">
   <div class="container">
+
     <BaseHeaderLayout :leftSpan="10">
     <BaseHeaderLayout :leftSpan="10">
       <template slot="left">
       <template slot="left">
         <ws-button type="primary" @click="handleAdd()">添加</ws-button>
         <ws-button type="primary" @click="handleAdd()">添加</ws-button>
       </template>
       </template>
+
       <!-- 接单开始 -->
       <!-- 接单开始 -->
       <template slot="right">
       <template slot="right">
         <ws-input
         <ws-input
@@ -297,8 +299,9 @@ export default {
             response.records[i].identification = 'false'
             response.records[i].identification = 'false'
           }
           }
           this.warehouseList = response
           this.warehouseList = response
-
-          console.log(this.warehouseList, 'kankan')
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
         })
     },
     },
     statusquery(state) {
     statusquery(state) {

+ 3 - 3
src/views/purchasingManagement/procurementPlanLook.vue

@@ -32,15 +32,15 @@
           <el-form-item label="货名">
           <el-form-item label="货名">
             <el-input disabled v-model="dataList.goodsName" class="typeselect"></el-input>
             <el-input disabled v-model="dataList.goodsName" class="typeselect"></el-input>
           </el-form-item>
           </el-form-item>
-          <!-- 合同编号 -->
+          <!-- 计划采购量(吨) -->
           <el-form-item label="计划采购量(吨)">
           <el-form-item label="计划采购量(吨)">
             <el-input disabled v-model="dataList.plannedPurchaseVolume" class="typeselect"></el-input>
             <el-input disabled v-model="dataList.plannedPurchaseVolume" class="typeselect"></el-input>
           </el-form-item>
           </el-form-item>
-          <!-- 货名 -->
+          <!-- 最小成交量(吨) -->
           <el-form-item label="最小成交量(吨)">
           <el-form-item label="最小成交量(吨)">
             <el-input disabled v-model="dataList.minimumVolume"></el-input>
             <el-input disabled v-model="dataList.minimumVolume"></el-input>
           </el-form-item>
           </el-form-item>
-          <!--重量(吨)-->
+          <!--类型-->
           <el-form-item label="类型" span="1">
           <el-form-item label="类型" span="1">
             <el-input disabled v-model="dataList.procurementPlanType" maxlength="120" />
             <el-input disabled v-model="dataList.procurementPlanType" maxlength="120" />
           </el-form-item>
           </el-form-item>

+ 3 - 144
src/views/purchasingManagement/purchaseOrderList.vue

@@ -21,117 +21,6 @@
         </el-row>
         </el-row>
         <!-- <div> -->
         <!-- <div> -->
         <div>
         <div>
-          <!-- <el-button class="record" @click="dialogFormVisible = true">成交</el-button> -->
-          <!-- <el-dialog
-            width="30%"
-            title="客户信息"
-            :visible.sync="dialogFormVisible"
-            :append-to-body="true"
-          >
-          <el-form :model="form">-->
-          <!-- <el-form-item label="身份证正面" :label-width="formLabelWidth"> -->
-          <!-- <h4 style="margin-left: 15%;">身份证正面</h4>
-              <el-upload
-                action="https://jsonplaceholder.typicode.com/posts/"
-                list-type="picture-card"
-                :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove"
-                class="photo1"
-              >
-                <i class="el-icon-plus"></i>
-              </el-upload>
-              <el-dialog :visible.sync="dialogVisible">
-                <img width="100%" :src="dialogImageUrl" alt />
-          </el-dialog>-->
-          <!-- </el-form-item> -->
-
-          <!-- <el-form-item label="身份证反面" :label-width="formLabelWidth"> -->
-          <!-- <h4 style="margin-left: 62%; margin-top: -33.5%;">身份证反面</h4>
-              <el-upload
-                action="https://jsonplaceholder.typicode.com/posts/"
-                list-type="picture-card"
-                :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove"
-                class="photo2"
-              >
-                <i class="el-icon-plus"></i>
-              </el-upload>
-              <el-dialog :visible.sync="dialogVisible">
-                <img width="100%" :src="dialogImageUrl" alt />
-          </el-dialog>-->
-          <!-- </el-form-item> -->
-          <!-- <el-form-item label="姓名" :label-width="formLabelWidth"> -->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="身份证号" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal" ></el-input> -->
-          <!-- </el-form-item>
-          <hr />-->
-          <!-- <el-form-item label="身份证正面" :label-width="formLabelWidth"> -->
-          <!-- <h4 style="margin-left: 15%;">银行卡正面</h4>
-              <el-upload
-                action="https://jsonplaceholder.typicode.com/posts/"
-                list-type="picture-card"
-                :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove"
-                class="photo1"
-              >
-                <i class="el-icon-plus"></i>
-              </el-upload>
-              <el-dialog :visible.sync="dialogVisible">
-                <img width="100%" :src="dialogImageUrl" alt />
-          </el-dialog>-->
-          <!-- </el-form-item> -->
-          <!-- <el-form-item label="身份证反面" :label-width="formLabelWidth"> -->
-          <!-- <h4 style="margin-left: 61%; margin-top: -33.5%;">银行卡反面</h4>
-              <el-upload
-                action="https://jsonplaceholder.typicode.com/posts/"
-                list-type="picture-card"
-                :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove"
-                class="photo2"
-              >
-                <i class="el-icon-plus"></i>
-              </el-upload>
-              <el-dialog :visible.sync="dialogVisible">
-                <img width="100%" :src="dialogImageUrl" alt />
-          </el-dialog>-->
-          <!-- </el-form-item> -->
-          <!-- <el-form-item label="银行卡号" :label-width="formLabelWidth"> -->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="开户行" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="开户支行" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="收款人姓名" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="收款人身份证号" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="手机号" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-          <el-form-item label="联系地址" :label-width="formLabelWidth">-->
-          <!-- <el-input v-model="form.region" autocomplete="off"  class="deal"></el-input> -->
-          <!-- </el-form-item>
-              <hr />
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-              <el-button @click="dialogFormVisible = false">取 消</el-button>
-            </div>
-          </el-dialog>-->
-
           <ws-button type="primary" @click="dialogVisible = true">全部订单</ws-button>
           <ws-button type="primary" @click="dialogVisible = true">全部订单</ws-button>
           <ws-button type="primary" @click="handleAdd()">待审核</ws-button>
           <ws-button type="primary" @click="handleAdd()">待审核</ws-button>
           <ws-button type="primary" @click="handleAdd()">执行中</ws-button>
           <ws-button type="primary" @click="handleAdd()">执行中</ws-button>
@@ -1000,13 +889,6 @@ export default {
       })
       })
       .then(() => {
       .then(() => {
         console.log(23456678790)
         console.log(23456678790)
-      // chengList({
-      //    id: this.id,
-      //    compId: sessionStorage.getItem('ws-pf_compId'),
-      //    transactionPrice: this.transactionPrice,
-      //    transactionsNumber: this.transactionsNumber,
-      //    basis: this.basis,
-      // })
       chengList(this.warehouseList)
       chengList(this.warehouseList)
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
@@ -1034,17 +916,11 @@ export default {
         .toPromise()
         .toPromise()
         .then(response => {
         .then(response => {
           this.warehouseList = response
           this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
         })
     },
     },
-    // loaddata(){
-    //   chengList({
-    //      compId: sessionStorage.getItem('ws-pf_compId'),
-    //   })
-    //   .toPromise()
-    //   .then(response => {
-    //       this.warehouseList = response
-    //     })
-    // },
     handleRemove(file) {
     handleRemove(file) {
       console.log(file)
       console.log(file)
     },
     },
@@ -1055,23 +931,6 @@ export default {
     handleDownload(file) {
     handleDownload(file) {
       console.log(file)
       console.log(file)
     },
     },
-
-    // statusquery(state) {
-    //   this.searchType = state
-    //   this.getList()
-    // },
-    // delivery(item) {
-    //   this.$router.push({
-    //     path: 'warehouseManagementDelivery',
-    //     query: {
-    //       baseId: item.warehouseId,
-    //       positionId: item.binNumberId,
-    //       warehouseName: item.warehouseName,
-    //       binNumber: item.binNumber,
-    //       capacity: item.capacity
-    //     }
-    //   })
-    // },
     getSpanArr(data) {
     getSpanArr(data) {
       let that = this
       let that = this
 
 

Plik diff jest za duży
+ 686 - 188
src/views/salesManagement/salesPlanAdd.vue


+ 532 - 178
src/views/salesManagement/salesPlanEdit.vue

@@ -25,104 +25,158 @@
         </div>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
           <!-- 标题 -->
-          <el-form-item label="标题" span="1">
-            <el-input v-model="dataList.warehouseName" maxlength="16" placeholder="请输入标题,不超过16个字" />
-          </el-form-item>
+          <ws-form-item label="标题" span="1" prop="title">
+            <el-input v-model="dataList.title" maxlength="16" placeholder="请输入标题,不超过16个字" />
+          </ws-form-item>
           <!-- 货名 -->
           <!-- 货名 -->
-          <el-form-item label="货名" span="1">
-            <el-select
-              v-model="dataList.inOutType"
-              class="typeselect"
-              placeholder="请选择货名"
+          <ws-form-item label="货名" span="1" prop="goodsName">
+            <ws-select
               disabled
               disabled
-            />
-          </el-form-item>
+              v-model="dataList.goodsName"
+              placeholder
+              class="typeselect"
+              @change="selectgoodsName"
+            >
+              <ws-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
           <!-- 计划销售量(吨) -->
           <!-- 计划销售量(吨) -->
-          <el-form-item label="计划销售量(吨)" span="1">
-            <el-input v-model="dataList.contractNo" class="typeselect" placeholder="请输入销售量" />
-          </el-form-item>
+          <ws-form-item label="计划销售量(吨)" span="1" prop="plannedSaleVolume">
+            <el-input
+              v-model="dataList.plannedSaleVolume"
+              class="typeselect"
+              placeholder="请输入计划采购量"
+            />
+          </ws-form-item>
           <!-- 最小成交量 -->
           <!-- 最小成交量 -->
-          <el-form-item label="最小成交量(吨)" span="1">
-            <el-input v-model="dataList.goodsName" placeholder="请输入最小成交量" />
-          </el-form-item>
+          <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
+            <el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" />
+          </ws-form-item>
           <!--类型-->
           <!--类型-->
-          <el-form-item label="类型" span="1">
-            <el-select v-model="dataList.weight" maxlength="120" placeholder="请选择类型" disabled />
-          </el-form-item>
+          <ws-form-item label="类型" span="1" prop="salePlanType">
+            <ws-select
+              disabled
+              v-model="dataList.salePlanType"
+              placeholder
+              class="typeselect"
+              @change="selectsalePlanType"
+            >
+              <ws-option
+                v-for="item in salePlanTypeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
           <!-- 价格类型 -->
           <!-- 价格类型 -->
-          <el-form-item label="价格类型" span="1">
-            <el-input v-model="dataList.grade" placeholder="请输入价格类型" disabled />
-          </el-form-item>
+          <ws-form-item label="价格类型" span="1" prop="priceType">
+            <el-input v-model="dataList.priceType" disabled />
+          </ws-form-item>
           <!-- 基差 -->
           <!-- 基差 -->
-          <el-form-item label="基差(元/吨)" span="1">
-            <el-input v-model="dataList.grade" placeholder="请输入基差" />
-          </el-form-item>
+          <ws-form-item
+            v-show="dataList.salePlanType=='期货'"
+            label="基差(元/吨)"
+            span="1"
+            prop="basisPrice"
+          >
+            <el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
+          </ws-form-item>
           <!--销售价格(元)-->
           <!--销售价格(元)-->
-          <el-form-item label="销售价格(元)" span="1">
+          <ws-form-item
+            v-show="dataList.salePlanType=='现货'"
+            label="销售价格(元)"
+            span="1"
+            prop="salePrice"
+          >
             <el-input
             <el-input
-              v-model="dataList.bulkDensity"
+              v-model="dataList.salePrice"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
               placeholder="请输入销售价格"
               placeholder="请输入销售价格"
             />
             />
-          </el-form-item>
+          </ws-form-item>
           <!--出货库-->
           <!--出货库-->
-          <el-form-item label="出货库" span="1">
+          <ws-form-item label="出货库" span="1" prop="sendWarehouse">
             <el-select
             <el-select
-              v-model="dataList.waterContent"
+              disabled
+              v-model="dataList.sendWarehouse"
               maxlength="120"
               maxlength="120"
               size="small"
               size="small"
-              placeholder="请选择出货库"
+              
             />
             />
-          </el-form-item>
+            <el-option
+              v-for="item in warehouseList1"
+              :key="item.constKey"
+              :label="item.warehouseName"
+              :value="item.warehouseName"
+            ></el-option>
+          </ws-form-item>
           <!--出货库所在地区-->
           <!--出货库所在地区-->
-          <el-form-item label="出货库所在地区" span="1">
-            <el-select
-              v-model="dataList.unitPrice"
-              maxlength="120"
-              size="small"
+          <ws-form-item label="出货库所在地区" span="1" >
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions"
+              clearable
+              size="large"
               placeholder="请选择出货库所在地区"
               placeholder="请选择出货库所在地区"
+              @change="handleChange"
+              style="width:200%"
             />
             />
-          </el-form-item>
+          </ws-form-item>
           <!--运费承担方-->
           <!--运费承担方-->
-          <el-form-item label="运费承担方" span="1">
-            <el-select
-              v-model="dataList.unitPrice"
-              maxlength="120"
-              size="small"
-              placeholder="请选择运费承担方"
-            />
-          </el-form-item>
+          <ws-form-item label="运费承担方" span="1" prop="freightPayer">
+            <ws-select
+              v-model="dataList.freightPayer"
+              placeholder
+              class="typeselect"
+              @change="selectfreightPayer"
+            >
+              <ws-option
+                v-for="item in freightPayerList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
           <!--包装方式-->
           <!--包装方式-->
-          <el-form-item label="包装方式" span="1">
-            <el-select
-              v-model="dataList.agent"
-              filterable
-              :filter-method="dataFilter"
-              placeholder="请选择包装方式"
-            ></el-select>
-          </el-form-item>
+          <ws-form-item label="包装方式" span="1" prop="packingType">
+            <ws-select
+              v-model="dataList.packingType"
+              placeholder
+              class="typeselect"
+              @change="selectpackingType"
+            >
+              <ws-option
+                v-for="item in packingTypeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
           <!--装袋备注=-->
           <!--装袋备注=-->
-          <el-form-item label="装袋备注" span="1">
+          <el-form-item v-if="dataList.packingType != '散装'" label="装袋备注" span="1" prop="baggingNotes">
             <el-input
             <el-input
-              v-model="dataList.businessDescribe"
+              v-model="dataList.baggingNotes"
               size="small"
               size="small"
               placeholder="请输入装袋要求如:98斤,王中王彩袋"
               placeholder="请输入装袋要求如:98斤,王中王彩袋"
             />
             />
           </el-form-item>
           </el-form-item>
           <!-- 卖方 -->
           <!-- 卖方 -->
-          <el-form-item label="卖方" span="1">
-            <el-input
-              v-model="dataList.unitPrice"
-              maxlength="120"
-              size="small"
-              placeholder="请输入卖方名称"
-            />
-          </el-form-item>
+          <ws-form-item label="买方" span="1" prop="seller">
+            <el-input v-model="dataList.seller" maxlength="120" size="small" placeholder="请输入卖方名称" />
+          </ws-form-item>
           <!-- 卖方电话 -->
           <!-- 卖方电话 -->
-          <el-form-item label="卖方电话" span="1">
+          <el-form-item label="买方电话" span="1" prop="sellerPhone">
             <el-input
             <el-input
-              v-model="dataList.agent"
+              v-model="dataList.sellerPhone"
               filterable
               filterable
               :filter-method="dataFilter"
               :filter-method="dataFilter"
               placeholder="请输入卖方电话"
               placeholder="请输入卖方电话"
@@ -136,64 +190,89 @@
           <h3>货物要求</h3>
           <h3>货物要求</h3>
         </div>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
         <el-form ref="dataList" :model="dataList" label-width="140px">
-          <el-form-item label="水分(%)<=" span="1">
-            <el-input v-model="dataList.warehouseName" class="typeselect" placeholder="请输入水分占比" />
+          <!-- 水分 -->
+          <el-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
           </el-form-item>
           </el-form-item>
-
           <!-- 容重 -->
           <!-- 容重 -->
-          <el-form-item label="容重(g/l)<=" span="1">
-            <el-input v-model="dataList.warehouseName" class="typeselect" placeholder="请输入容重" />
+          <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
+            <el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
           </el-form-item>
           </el-form-item>
           <!-- 热损伤 -->
           <!-- 热损伤 -->
-          <el-form-item label="热损伤(%)<=" span="1">
-            <el-input v-model="dataList.inOutType" class="typeselect" placeholder="请输入热损伤占比" />
+          <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
           </el-form-item>
           </el-form-item>
           <!-- 杂质 -->
           <!-- 杂质 -->
-          <el-form-item label="杂质(%)<=" span="1">
-            <el-input v-model="dataList.contractNo" class="typeselect" placeholder="请输入杂质占比" />
+          <el-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <el-input v-model="dataList.impurity" class="typeselect" placeholder="请输入杂质占比" />
           </el-form-item>
           </el-form-item>
           <!-- 霉变粒 -->
           <!-- 霉变粒 -->
-          <el-form-item label="霉变粒(%)<=" span="1">
-            <el-input v-model="dataList.goodsName" placeholder="请输入霉变粒占比" />
+          <el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+            <el-input v-model="dataList.mildewGrain" placeholder="请输入霉变粒占比" />
           </el-form-item>
           </el-form-item>
           <!--不完善粒(%)<=-->
           <!--不完善粒(%)<=-->
-          <el-form-item label="不完善粒(%)<=" span="1">
-            <el-input v-model="dataList.weight" maxlength="120" placeholder="请输入不完善粒占比" />
+          <el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+            <el-input v-model="dataList.imperfectGrain" maxlength="120" placeholder="请输入不完善粒占比" />
           </el-form-item>
           </el-form-item>
           <!-- 蛋白(%)<= -->
           <!-- 蛋白(%)<= -->
-          <el-form-item label="蛋白(%)<=" span="1">
-            <el-input v-model="dataList.grade" class="typeselect" placeholder="请输入蛋白占比" />
+          <el-form-item label="蛋白(%)<=" span="1" prop="protein">
+            <el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
           </el-form-item>
           </el-form-item>
           <!--粒型-->
           <!--粒型-->
-          <el-form-item label="粒型" span="1">
-            <el-select
-              v-model="dataList.bulkDensity"
-              maxlength="120"
-              size="small"
-              placeholder="请选择粒型"
-            />
-          </el-form-item>
+          <ws-form-item label="粒型" span="1" prop="grain">
+            <ws-select
+              v-model="dataList.grain"
+              placeholder
+              class="typeselect"
+              @change="selectgrain"
+            >
+              <ws-option
+                v-for="item in grainList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
           <!--品级-->
           <!--品级-->
-          <el-form-item label="品级" span="1">
-            <el-select
-              v-model="dataList.waterContent"
-              maxlength="120"
-              size="small"
-              placeholder="请选择品级"
-            />
-          </el-form-item>
+          <ws-form-item label="品级" span="1" prop="grade">
+            <ws-select
+              v-model="dataList.grade"
+              placeholder
+              class="typeselect"
+              @change="selectgrade"
+            >
+              <ws-option
+                v-for="item in gradeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
           <!--产地-->
           <!--产地-->
-          <el-form-item label="产地" span="1">
-            <el-select
-              v-model="dataList.unitPrice"
-              maxlength="120"
-              size="small"
+          <ws-form-item label="产地" span="1" >
+            <el-cascader
+              :options="options1_"
+              v-model="selectedOptions1"
+              clearable
+              size="large"
               placeholder="请选择产地"
               placeholder="请选择产地"
+              @change="handleChange1"
+              style="width:200%"
             />
             />
-          </el-form-item>
+          </ws-form-item>
           <!--产出年份-->
           <!--产出年份-->
-          <el-form-item label="产出年份" span="1">
-            <el-select v-model="dataList.unitPrice" size="small" placeholder="请选择年份" />
+          <el-form-item label="产出年份" span="1" prop="outputYear">
+
+        <el-date-picker
+              v-model="dataList.outputYear"
+              type="year"
+              align="right"
+              unlink-panels
+              range-separator="至"
+              placeholder="开始日期"
+            ></el-date-picker>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
       </div>
       </div>
@@ -206,15 +285,12 @@
 </template>
 </template>
 <script>
 <script>
 import {
 import {
-  getwarehousename,
-  xialaNo,
-  addoreditoutput,
-  outexamine
-} from '@/model/tasksport/index'
-import { packList } from '@/model/contarct/index'
-import { pullDown, getstaff } from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
+  saleLook,
+  saleEdit,
+} from '@/model/salesManagement/index'
+import { regionData, CodeToText, TextToCode ,provinceAndCityDataPlus} from 'element-china-area-data'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
+import { packList } from '@/model/contarct/index'
 import { mapActions, mapGetters, mapState } from 'vuex'
 import { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -249,6 +325,8 @@ export default {
       showType: true,
       showType: true,
       // 年
       // 年
       year: '',
       year: '',
+      options1_: provinceAndCityDataPlus,
+      options_: regionData,
       contractNoList: [],
       contractNoList: [],
       deptBudgetTotal: 0,
       deptBudgetTotal: 0,
       readonly: true,
       readonly: true,
@@ -303,9 +381,18 @@ export default {
       contractList: [],
       contractList: [],
       inOutTaskNo: '',
       inOutTaskNo: '',
       inOutTaskNo1: '',
       inOutTaskNo1: '',
+      freightPayerList: '',
+      packingTypeList: '',
       dataList: { taskTypeKey: '1' },
       dataList: { taskTypeKey: '1' },
       dataList1: { taskTypeKey: '1' },
       dataList1: { taskTypeKey: '1' },
       historyList: [],
       historyList: [],
+      salePlanTypeList:[],
+      selectedOptions:[],
+      selectedOptions1: [],
+      grainList: [],
+      warehouseNameList: [],
+      warehouseNameList1: [],
+      warehouseList1: [],
       pickerBeginDateBefore: {
       pickerBeginDateBefore: {
         disabledDate: time => {
         disabledDate: time => {
           return time.getTime() > Date.now()
           return time.getTime() > Date.now()
@@ -314,16 +401,20 @@ export default {
       accessoryTFs: false
       accessoryTFs: false
     }
     }
   },
   },
-  mounted() {
-    this.getList()
+  activated() {
+    this.loaddata()
+    this.showType = this.isShow
   },
   },
+  mounted() {},
   methods: {
   methods: {
     //返回按钮
     //返回按钮
     revert() {
     revert() {
       this.$router.go(-1)
       this.$router.go(-1)
     },
     },
     returnsales() {
     returnsales() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.dataList = {}
+      // this.selectedOptions = ''
+      this.$router.push({ path: 'salesPlanList' })
     },
     },
     // 获取当前年月日
     // 获取当前年月日
     getdate() {
     getdate() {
@@ -372,6 +463,14 @@ export default {
         this.options = this.staffList
         this.options = this.staffList
       }
       }
     },
     },
+    
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
     selectstaff(e) {
     selectstaff(e) {
       for (var i = 0; i < this.staffList.length; i++) {
       for (var i = 0; i < this.staffList.length; i++) {
         if (this.staffList[i].staffName == e) {
         if (this.staffList[i].staffName == e) {
@@ -386,49 +485,325 @@ export default {
         }
         }
       }
       }
     },
     },
-    requestadd(list, status) {
-      this.$refs.dataList.validate(valid => {
-        if (valid) {
-          list.compId = sessionStorage.getItem('ws-pf_compId')
-          list.publisher =
-            sessionStorage.getItem('ws-pf_roleName') +
-            sessionStorage.getItem('ws-pf_staffName')
-          addoreditoutput(list)
-            .toPromise()
-            .then(response => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
+    selectgrain(e) {
+      for (var i = 0; i < this.grainList.length; i++) {
+        if (this.grainList[i].constValue == e) {
+          this.dataList.grainKey = this.grainList[i].constKey
         }
         }
-      })
+      }
+    },
+    selectpackingType(e) {
+      for (var i = 0; i < this.packingTypeList.length; i++) {
+        if (this.packingTypeList[i].constValue == e) {
+          this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+        }
+      }
+    },
+    selectfreightPayer(e) {
+      for (var i = 0; i < this.freightPayerList.length; i++) {
+        if (this.freightPayerList[i].constValue == e) {
+          this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.dataList.gradeKey = this.gradeList[i].constKey
+        }
+      }
+    },
+    selectsalePlanType(e) {
+      for (var i = 0; i < this.salePlanTypeList.length; i++) {
+        if (this.salePlanTypeList[i].constValue == e) {
+          this.dataList.salePlanTypeKey = this.salePlanTypeList[
+            i
+          ].constKey
+        }
+      }
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+      this.dataList.sendPrivate = CodeToText[value[0]]
+      this.dataList.sendCity = CodeToText[value[1]]
+      this.dataList.sendArea = CodeToText[value[2]]
+    },
+    handleChange1(value) {
+      this.selectedOptions1 = value
+      this.dataList.sendPrivate = CodeToText[value[0]]
+      this.dataList.sendCity = CodeToText[value[1]]
+      this.dataList.sendArea = CodeToText[value[2]]
+    },
+    submit() {
+      if (this.outputYear) {
+        this.startDate = this.dateFormat('YYYY-mm-dd', this.outputYear[0])
+        this.endDate = this.dateFormat('YYYY-mm-dd', this.outputYear[1])
+      } else {
+        this.startDate = ''
+        this.endDate = ''
+      }
+      // this.getList()
     },
     },
     //关闭
     //关闭
     close() {
     close() {
       this.$router.push({ path: 'procurementPlanList' })
       this.$router.push({ path: 'procurementPlanList' })
     },
     },
-    //提交按钮
-    // submit() {
-    //   if (this.dataList.taskTypeKey == 1) {
-    //     this.dataList.inOutTaskNo = this.inOutTaskNo
-    //     this.requestadd(this.dataList)
-    //   } else if (this.dataList.taskTypeKey == 2) {
-    //     this.dataList.inOutTaskNo = this.inOutTaskNo1
-    //     this.requestadd(this.dataList)
-    //   } else if (
-    //     this.dataList.taskTypeKey == 3 ||
-    //     this.dataList.taskTypeKey == 4
-    //   ) {
-    //     this.dataList.inOutTaskNo = this.inOutTaskNo
-    //     this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
-    //     this.requestadd(this.dataList, 'repetition')
-    //     this.dataList1.inOutTaskNo = this.inOutTaskNo1
-    //     this.dataList1.relevanceId = this.dataList.relevanceId
-    //     this.requestadd(this.dataList1, 'repetition')
-    //   }
-    // },
+    
+    loaddata() {
+       saleLook({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.dataList = response
+          var tmp = []
+          tmp[0] = TextToCode[this.dataList.sendPrivate].code
+          tmp[1] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity].code
+          tmp[2] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity][this.dataList.sendArea].code
+          this.selectedOptions = tmp
+          var tmp1 = []
+          tmp1[0] = TextToCode[this.dataList.outputPrivate].code
+          tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
+          this.selectedOptions1 = tmp1
+        })
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then(response => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then(response => {
+          this.gradeList = response
+        })
+      //粒形
+      packList({ constId: 'PRO4' })
+        .toPromise()
+        .then(response => {
+          this.grainList = response
+        })
+      //类型
+      packList({ constId: 'PRO1' })
+        .toPromise()
+        .then(response => {
+          this.salePlanTypeList = response
+        })
+      //包装方式
+      packList({ constId: 'PRO2' })
+        .toPromise()
+        .then(response => {
+          this.packingTypeList = response
+        })
+      //运费承担方
+      packList({ constId: 'PRO3' })
+        .toPromise()
+        .then(response => {
+          this.freightPayerList = response
+        })
+    },
+    submit() {
+      if (!this.dataList.title) {
+        this.$message({
+          message: '标题不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.title.length > 16) {
+        this.$message({
+          message: '标题输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.plannedSaleVolume) {
+        this.$message({
+          message: '计划销售量不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.minimumVolume) {
+        this.$message({
+          message: '最小交易量不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.seller) {
+        this.$message({
+          message: '卖方不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.seller.length > 25 || this.dataList.seller.length < 1) {
+        this.$message({
+          message: '卖方输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.sellerPhone.length != 11) {
+        this.$message({
+          message: '卖方电话输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.waterContent) {
+        this.$message({
+          message: '水分不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.waterContent > 40 || this.dataList.waterContent < 1) {
+        this.$message({
+          message: '水分输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        String(this.dataList.waterContent).indexOf('.') != -1 &&
+        String(this.dataList.waterContent).length -
+          (String(this.dataList.waterContent).indexOf('.') + 1) >
+          2
+      ) {
+        this.$message({
+          message: '水分输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.dataList.bulkDensity &&
+          String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+          String(this.dataList.bulkDensity).length -
+            (String(this.dataList.bulkDensity).indexOf('.') + 1) >
+            2) ||
+        this.dataList.bulkDensity > 1000 ||
+        this.dataList.bulkDensity < 500
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.dataList.protein &&
+          String(this.dataList.protein).indexOf('.') != -1 &&
+          String(this.dataList.protein).length -
+            (String(this.dataList.protein).indexOf('.') + 1) >
+            2) ||
+        this.dataList.protein > 40 ||
+        this.dataList.protein < 1
+      ) {
+        this.$message({
+          message: '蛋白占比输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.impurity &&
+        String(this.dataList.impurity).indexOf('.') != -1 &&
+        String(this.dataList.impurity).length -
+          (String(this.dataList.impurity).indexOf('.') + 1) >
+          2
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.mildewGrain &&
+        String(this.dataList.mildewGrain).indexOf('.') != -1 &&
+        String(this.dataList.mildewGrain).length -
+          (String(this.dataList.mildewGrain).indexOf('.') + 1) >
+          2
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.jiaorenli &&
+        String(this.dataList.jiaorenli).indexOf('.') != -1 &&
+        String(this.dataList.jiaorenli).length -
+          (String(this.dataList.jiaorenli).indexOf('.') + 1) >
+          2
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.imperfectGrain &&
+        String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
+        String(this.dataList.imperfectGrain).length -
+          (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
+          2
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      this.dataList.id = this.$route.query.id
+      this.$confirm(`提交后该销售信息将发布到交易平台,是否确定提交?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+        .then(() => {
+          this.$refs.dataList.validate((valid) => {
+            if (valid) {
+              // this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
+              // this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
+              this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]
+              this.dataList.sendCity = CodeToText[this.selectedOptions[1]]
+              this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
+              this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
+              this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+
+              this.dataList.compId = this.compId
+              this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+              saleEdit(this.dataList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('编辑成功')
+                  ;(this.outputYear = ''),
+                    this.$router.push({ path: 'salesPlanList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          console.log(3523543534)
+          return false
+        })
+    },
+
     selectwarehouseName() {},
     selectwarehouseName() {},
     tarechange(e) {
     tarechange(e) {
       if (this.dataList.grossWeight && this.dataList.tare) {
       if (this.dataList.grossWeight && this.dataList.tare) {
@@ -451,13 +826,6 @@ export default {
         }
         }
       }
       }
     },
     },
-    selectgoodsName1(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList1.goodsNameKey = this.goodnameList[i].constKey
-        }
-      }
-    },
     selectpackingMethod(e) {
     selectpackingMethod(e) {
       for (var i = 0; i < this.packtypeList.length; i++) {
       for (var i = 0; i < this.packtypeList.length; i++) {
         if (this.packtypeList[i].constValue == e) {
         if (this.packtypeList[i].constValue == e) {
@@ -497,24 +865,6 @@ export default {
       var Rand = Math.random()
       var Rand = Math.random()
       return Min + Math.round(Rand * Range)
       return Min + Math.round(Rand * Range)
     },
     },
-    getList() {
-      outexamine({ relevanceId: this.$route.query.relevanceId })
-        .toPromise()
-        .then(response => {
-          if (response.length > 1) {
-            this.dataList = response[0]
-            this.dataList1 = response[1]
-          } else {
-            console.log(response[0].taskTypeKey)
-            if (response[0].taskTypeKey == 2) {
-              this.dataList1 = response[0]
-            } else {
-              this.dataList = response[0]
-            }
-          }
-        })
-    },
-
     // deletecontract(){},
     // deletecontract(){},
     //删除
     //删除
     approve() {},
     approve() {},
@@ -553,6 +903,7 @@ export default {
       align-items: center;
       align-items: center;
       text-align: left;
       text-align: left;
       overflow: hidden;
       overflow: hidden;
+      
     }
     }
   }
   }
 }
 }
@@ -753,4 +1104,7 @@ export default {
   top: 21%;
   top: 21%;
   font-size: 20px;
   font-size: 20px;
 }
 }
+/deep/.typeselect .el-input__inner {
+  color: #8890b1;
+}
 </style>
 </style>

+ 325 - 140
src/views/salesManagement/salesPlanList.vue

@@ -1,48 +1,33 @@
 //销售计划
 //销售计划
 <template>
 <template>
   <div class="container">
   <div class="container">
-    <el-row>
-      <el-col :span="12">
-        <h2 class="bg-left title"></h2>
-      </el-col>
-      <el-col :span="12" class="bg-right">
-        <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
-        </el-button>
-      </el-col>
-    </el-row>
-    <!-- <div> -->
-    <div>
-      <ws-input
-        v-model="searchKeyWord"
-        placeholder="可按照合同编号和任务编号进行查找"
-        clearable
-        maxlength="500"
-        type="input"
-        class="findValue"
-      ></ws-input>
-      <ws-button class="but" type="primary" @click="find()">
-        <img
-          width="16"
-          height="16"
-          style="
+    <BaseHeaderLayout :leftSpan="10">
+      <template slot="left">  <ws-button type="primary" @click="handleAdd()">添加</ws-button> </template>
+      <!-- 接单开始 -->
+      <template slot="right">
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按销售计划编号和标题查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
               vertical-align: text-top;
               vertical-align: text-top;
               position: relative;
               position: relative;
               top: 0px;
               top: 0px;
               left: -8px;
               left: -8px;
             "
             "
-          src="../../../public/img/sousuo.png"
-          alt
-        />
-      </ws-button>
-    </div>
-    <ws-button type="primary" @click="handleAdd()">添加</ws-button>
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
     <el-table
     <el-table
       class="wenzi"
       class="wenzi"
       :data="warehouseList.records"
       :data="warehouseList.records"
@@ -50,14 +35,77 @@
       height="780"
       height="780"
     >
     >
       <el-table-column type="index" label="序号" width="80"></el-table-column>
       <el-table-column type="index" label="序号" width="80"></el-table-column>
-      <el-table-column class="table_td" prop="inOutTaskNo" label="销售计划编号"></el-table-column>
-      <el-table-column class="table_td" prop="contractNo" label="标题"></el-table-column>
-      <el-table-column class="table_td" prop="warehouseName" label="货名"></el-table-column>
-      <el-table-column class="table_td" prop="inOutType" label="重量(吨)"></el-table-column>
-      <el-table-column class="table_td" prop="weight" label="基差(元/吨)"></el-table-column>
-      <el-table-column class="table_td" prop="send" label="单价(元/吨)"></el-table-column>
-      <el-table-column class="table_td" prop="predictDate" label="出货库"></el-table-column>
-      <el-table-column prop="taskStatus" label="状态">
+      <el-table-column
+        class="table_td"
+        prop="salePlanNo"
+        label="销售计划编号"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="title"
+        label="标题"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="goodsName"
+        label="货名"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="plannedSaleVolume"
+        label="重量(吨)"
+      ></el-table-column>
+      <el-table-column class="table_td" prop="basisPrice" label="基差(元/吨)">
+        <template slot-scope="scope">
+          <div v-if="scope.row.salePlanType == '期货'">
+            <div class="inputChenge">
+              <el-input
+                v-model="scope.row.basisPrice"
+                @change="varietyClick(scope.row)"
+                class="inputs"
+              ></el-input>
+            </div>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="varietyClick(scope.row)"
+              alt=""
+            />
+          </div>
+          <div v-else>—</div>
+        </template>
+      </el-table-column>
+      <el-table-column class="table_td" prop="unitPrice" label="单价(元/吨)">
+        <template slot-scope="scope">
+          <div v-if="scope.row.salePlanType == '现货'">
+            <div class="inputChenge">
+              <!-- readonly -->
+              <el-input
+                v-model="scope.row.unitPrice"
+                v-bind:class="inputs"
+                @change="varietyClick(scope.row)"
+              ></el-input>
+            </div>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="varietyClick(scope.row)"
+              alt=""
+            />
+          </div>
+          <div v-else>—</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="sendWarehouse"
+        label="出货库"
+      ></el-table-column>
+      <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-popover
           <el-popover
             placement="left"
             placement="left"
@@ -68,17 +116,30 @@
           >
           >
             <template>
             <template>
               <span slot="reference">
               <span slot="reference">
-                <span v-if="scope.row.taskStatus == '展示中'" class="executory"></span>
-                <span v-if="scope.row.taskStatus == '已隐藏'" class="inExecution"></span>
+                <span v-if="scope.row.showFlag == 1">
+                  <span class="executory"></span>展示中</span
+                >
+                <span v-if="scope.row.showFlag == 0">
+                  <span class="inExecution"></span>已隐藏</span
+                >
               </span>
               </span>
             </template>
             </template>
             <div>
             <div>
               <!-- <p style="margin-top: 0; padding-left: 10px">历史记录</p> -->
               <!-- <p style="margin-top: 0; padding-left: 10px">历史记录</p> -->
-              <div v-for="(item, index) in historyList" class="flex" :key="index">
-                <div class="vertical-text vertical-text-left">{{ item.updateDate }}</div>
+              <div
+                v-for="(item, index) in historyList"
+                class="flex"
+                :key="index"
+              >
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
                 <div>
                 <div>
                   <div class="vertical-circle"></div>
                   <div class="vertical-circle"></div>
-                  <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
                 </div>
                 </div>
                 <div class="vertical-text">
                 <div class="vertical-text">
                   {{ item.operateUser }}
                   {{ item.operateUser }}
@@ -88,9 +149,21 @@
               </div>
               </div>
             </div>
             </div>
           </el-popover>
           </el-popover>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column class="table_td" label="更新时间" prop="establishDate"></el-table-column>
+      <el-table-column
+        class="table_td"
+        label="更新时间"
+        prop="updateDate"
+      ></el-table-column>
       <el-table-column prop="seller" label="操作" width="300">
       <el-table-column prop="seller" label="操作" width="300">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <div class="record" @click="handleLook(scope.row)">查看</div>
           <div class="record" @click="handleLook(scope.row)">查看</div>
@@ -104,15 +177,20 @@
       @size-change="handleSizeChange"
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"
       @current-change="handleCurrentChange"
       :current-page="currentPage"
       :current-page="currentPage"
-      :page-size="pageSize"
+      :page-size="deptCircularPage.pageSize"
       layout="total, sizes, prev, pager, next, jumper"
       layout="total, sizes, prev, pager, next, jumper"
       :total="deptBudgetTotal"
       :total="deptBudgetTotal"
-    ></el-pagination>
+    >
+    </el-pagination>
   </div>
   </div>
   <!-- </div> -->
   <!-- </div> -->
 </template>
 </template>
 <script>
 <script>
-import { taskList } from '@/model/warehouse/index'
+import {
+  salePlan,
+  saleDel,
+  saleEditOther,
+} from '@/model/salesManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
@@ -121,7 +199,7 @@ export default {
   name: 'viewSpareMoney',
   name: 'viewSpareMoney',
   components: {
   components: {
     WsUpload,
     WsUpload,
-    Pagination
+    Pagination,
   },
   },
   watch: {
   watch: {
     vesselId(val) {
     vesselId(val) {
@@ -129,7 +207,7 @@ export default {
     },
     },
     isShow(val) {
     isShow(val) {
       this.showType = val
       this.showType = val
-    }
+    },
   },
   },
   data() {
   data() {
     return {
     return {
@@ -147,33 +225,34 @@ export default {
       year: '',
       year: '',
       pickerOptions: {},
       pickerOptions: {},
       value2: '',
       value2: '',
+      handleSizeChange: '',
       deptBudgetTotal: 0,
       deptBudgetTotal: 0,
       currentPage: 1,
       currentPage: 1,
-      tranTypeKey: 1,
       pageSize: 10,
       pageSize: 10,
       searchType: 1,
       searchType: 1,
       searchTypeText: '未完成',
       searchTypeText: '未完成',
       searchKeyWord: '',
       searchKeyWord: '',
-      contractType: 2,
-
+      contractType: 1,
+      pcFlag: 1,
       // 提交类型
       // 提交类型
       submitType: true,
       submitType: true,
       size: 10,
       size: 10,
       spanArr: [],
       spanArr: [],
       contractNo: '',
       contractNo: '',
-      inOutTaskNo: '',
+      // inOutTaskNo: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       deptCircularPage: {},
       warehouseList: [],
       warehouseList: [],
       deptBudgetList: {},
       deptBudgetList: {},
-      pcFlag:1,
+      pcFlag: 1,
       historyList: [],
       historyList: [],
       pickerBeginDateBefore: {
       pickerBeginDateBefore: {
-        disabledDate: time => {
+        disabledDate: (time) => {
           return time.getTime() > Date.now()
           return time.getTime() > Date.now()
-        }
+        },
       },
       },
-      accessoryTFs: false
+      accessoryTFs: false,
+      inputs: 'inputs1',
     }
     }
   },
   },
   activated() {
   activated() {
@@ -182,37 +261,33 @@ export default {
   },
   },
   methods: {
   methods: {
     getList() {
     getList() {
-      console.log(123456)
-      taskList({
+      salePlan({
         compId: sessionStorage.getItem('ws-pf_compId'),
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
         contractType: this.contractType,
         contractType: this.contractType,
         tranTypeKey: this.tranTypeKey,
         tranTypeKey: this.tranTypeKey,
-        searchType: this.searchType,
         contractNo: this.contractNo,
         contractNo: this.contractNo,
         pcFlag: this.pcFlag,
         pcFlag: this.pcFlag,
-        inOutTaskNo: this.inOutTaskNo
+        searchKeyWord:this.searchKeyWord
       })
       })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.warehouseList = response
           this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
         })
     },
     },
     statusquery(state) {
     statusquery(state) {
       this.searchType = state
       this.searchType = state
       this.getList()
       this.getList()
     },
     },
-    delivery(item) {
+    //编辑
+    handleEdit(row) {
       this.$router.push({
       this.$router.push({
-        path: 'warehouseManagementDelivery',
-        query: {
-          baseId: item.warehouseId,
-          positionId: item.binNumberId,
-          warehouseName: item.warehouseName,
-          binNumber: item.binNumber,
-          capacity: item.capacity
-        }
+        name: 'salesPlanEdit',
+        query: { id: row.id },
       })
       })
     },
     },
     getSpanArr(data) {
     getSpanArr(data) {
@@ -246,15 +321,48 @@ export default {
         }
         }
       })
       })
     },
     },
+    //添加
+    handleAdd() {
+      this.$router.push({
+        name: 'salesPlanAdd',
+      })
+    },
     //查看
     //查看
     handleLook(row) {
     handleLook(row) {
       this.$router.push({
       this.$router.push({
-        path: 'warehouseManagementPutOutLook',
+        name: 'salesPlanLook',
         query: {
         query: {
-          relevanceId: row.relevanceId
-        }
+          id: row.id,
+        },
       })
       })
     },
     },
+    handleDelete(row) {
+      var handleDelete = ' '
+      if (row.handleDelete == '') {
+      }
+      this.$confirm(`销售计划删除后不可恢复,是否确定删除?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          saleDel({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     //返回
     //返回
     revert() {
     revert() {
       this.$router.push({ path: 'warehouseManagementList' })
       this.$router.push({ path: 'warehouseManagementList' })
@@ -265,7 +373,7 @@ export default {
         'Y+': date.getFullYear().toString(), // 年
         'Y+': date.getFullYear().toString(), // 年
         'm+': (date.getMonth() + 1).toString(), // 月
         'm+': (date.getMonth() + 1).toString(), // 月
         'd+': date.getDate().toString(), // 日
         'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString() // 时
+        'H+': date.getHours().toString(), // 时
         // "M+": date.getMinutes().toString(),         // 分
         // "M+": date.getMinutes().toString(),         // 分
         // "S+": date.getSeconds().toString()          // 秒
         // "S+": date.getSeconds().toString()          // 秒
         // 有其他格式化字符需求可以继续添加,必须转化成字符串
         // 有其他格式化字符需求可以继续添加,必须转化成字符串
@@ -296,34 +404,65 @@ export default {
     },
     },
     editClick(row) {
     editClick(row) {
       var status = ''
       var status = ''
-      if (row.status == '待审核' || row.status == '已完成') {
-        status = '执行中'
-      } else if (row.status == '执行中') {
-        status = '已完成'
-      }
-      //cancelButtonClass: "btn-custom-cancel"
-      this.$confirm(`是否将状态改为${status}`, {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          alsostate({ id: row.id })
-            .toPromise()
-            .then(response => {
-              this.$notify.success({
-                title: '成功',
-                message: '状态修改成功'
-              })
-              this.getList()
-            })
-            .catch(response => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            })
+      var num = 1
+      if (row.showFlag == 1) {
+        status = '已隐藏'
+        num = 0
+        this.$confirm(`隐藏后交易信息不 再展示给客户,是否确定隐藏?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
         })
-        .catch(() => {
-          return false
+          .then(() => {
+            saleEditOther({
+              flag: 0,
+              showFlag: num,
+              id: row.id,
+            })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      } else if (row.showFlag == 0) {
+        status = '展示中'
+        num = 1
+        this.$confirm(`确定展示交易信息?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
         })
+          .then(() => {
+            saleEditOther({
+              flag: 0,
+              showFlag: num,
+              id: row.id,
+            })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      }
     },
     },
     selecttaskType(e) {
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
@@ -332,24 +471,10 @@ export default {
         }
         }
       }
       }
     },
     },
-    // fujian(row) {
-    //   if (
-    //     row.receiveAttachmentPath === null ||
-    //     row.receiveAttachmentPath === ''
-    //   ) {
-    //     EventBus.$emit(
-    //       'warning',
-    //       this.$t('system.noticeCircular.NoInformation')
-    //     )
-    //   } else {
-    //     this.accessoryTFs = true
-    //   }
-    //   this.appendixIdss = row.receiveAttachmentPath
-    // },
     handleExamine(row) {
     handleExamine(row) {
       this.$router.push({
       this.$router.push({
         name: 'salesContractExamine',
         name: 'salesContractExamine',
-        query: { id: row.id }
+        query: { id: row.id },
       })
       })
     },
     },
     // 关闭 dialog时 处理文件url 初始化upload组件
     // 关闭 dialog时 处理文件url 初始化upload组件
@@ -359,13 +484,12 @@ export default {
     history(row) {
     history(row) {
       billoperatehis({ id: row.id })
       billoperatehis({ id: row.id })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.historyList = response
           this.historyList = response
         })
         })
     },
     },
     //查找
     //查找
     find() {
     find() {
-      this.currentPage = 1
       this.getList()
       this.getList()
     },
     },
     async exportlist() {
     async exportlist() {
@@ -378,20 +502,76 @@ export default {
           searchType: this.searchType,
           searchType: this.searchType,
           searchKeyWord: this.searchKeyWord,
           searchKeyWord: this.searchKeyWord,
           startDate: this.startDate,
           startDate: this.startDate,
-          endDate: this.endDate
+          endDate: this.endDate,
         },
         },
         {},
         {},
         { responseType: 'blob' }
         { responseType: 'blob' }
       ).toPromise()
       ).toPromise()
       downloadFile({
       downloadFile({
         res: data,
         res: data,
-        fileName: `${this.date.year +
-          (this.date.month ? `-${this.date.month}` : '')}_销售合同`,
-        type: 'xls'
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_销售合同`,
+        type: 'xls',
       })
       })
     },
     },
-    total() {}
-  }
+    varietyClick(row) {
+      if (row.salePlanType == '期货') {
+        this.$confirm(`确定要修改基差?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            saleEditOther({
+              flag: 1,
+              basisPrice: row.basisPrice,
+              id: row.id,
+            })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      } else if (row.salePlanType == '现货') {
+        this.$confirm(`确定要修改单价?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            saleEditOther({
+              flag: 2,
+              unitPrice: row.unitPrice,
+              id: row.id,
+            })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      }
+    },
+  },
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
@@ -473,9 +653,6 @@ export default {
   height: 12px;
   height: 12px;
   background: #e9ecf7;
   background: #e9ecf7;
 }
 }
-// .el-row{
-//     height: 150px;
-// }
 .base_header_layout .grid-content {
 .base_header_layout .grid-content {
   margin-top: 80px;
   margin-top: 80px;
 }
 }
@@ -500,12 +677,15 @@ export default {
 }
 }
 .executory {
 .executory {
   background: #ff9f24;
   background: #ff9f24;
+  margin-right: 3px;
 }
 }
 .inExecution {
 .inExecution {
   background: #5878e8;
   background: #5878e8;
+  margin-right: 3px;
 }
 }
 .done {
 .done {
   background: #50cad4;
   background: #50cad4;
+  margin-right: 3px;
 }
 }
 .record,
 .record,
 .adjustment {
 .adjustment {
@@ -568,7 +748,6 @@ export default {
 .el-button--primary {
 .el-button--primary {
   background-color: #5878e8;
   background-color: #5878e8;
   border-color: #5878e8;
   border-color: #5878e8;
-  // margin-left: 85%;
   margin-top: 20px;
   margin-top: 20px;
 }
 }
 //导航条样式
 //导航条样式
@@ -589,19 +768,25 @@ export default {
 }
 }
 .but {
 .but {
   margin-left: 30%;
   margin-left: 30%;
-  /* margin-top: -32px; */
   overflow: auto;
   overflow: auto;
-  /* float: left; */
-  /* margin-left: 1px; */
   margin-left: -10px;
   margin-left: -10px;
 }
 }
 .el-input--small {
 .el-input--small {
   font-size: 13px;
   font-size: 13px;
   width: 390px;
   width: 390px;
-  margin-left: 74%;
 }
 }
 /deep/.el-table .el-table__header .cell,
 /deep/.el-table .el-table__header .cell,
 .el-table .el-table__body .cell {
 .el-table .el-table__body .cell {
   text-align: center;
   text-align: center;
 }
 }
-</style>
+.inputChenge {
+  width: 50%;
+  display: inline-flex;
+}
+.inputs1 {
+  border: none;
+}
+// .inputChenge>>>.el-input__inner{
+// border: none;
+// }
+</style>

+ 49 - 72
src/views/salesManagement/salesPlanLook.vue

@@ -26,59 +26,67 @@
         <el-form ref="dataList" :model="dataList" label-width="140px">
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
           <!-- 标题 -->
           <el-form-item label="标题">
           <el-form-item label="标题">
-            <el-input disabled v-model="dataList.warehouseName" class="typeselect"></el-input>
+            <el-input disabled v-model="dataList.title" class="typeselect"></el-input>
           </el-form-item>
           </el-form-item>
           <!-- 货名 -->
           <!-- 货名 -->
           <el-form-item label="货名">
           <el-form-item label="货名">
-            <el-select disabled v-model="dataList.inOutType" class="typeselect"></el-select>
+            <el-input disabled v-model="dataList.goodsName" class="typeselect"></el-input>
           </el-form-item>
           </el-form-item>
           <!-- 计划销售量(吨) -->
           <!-- 计划销售量(吨) -->
           <el-form-item label="计划销售量(吨)">
           <el-form-item label="计划销售量(吨)">
-            <el-input disabled v-model="dataList.contractNo" class="typeselect"></el-input>
+            <el-input disabled v-model="dataList.plannedSaleVolume" class="typeselect"></el-input>
           </el-form-item>
           </el-form-item>
           <!-- 最小成交量(吨) -->
           <!-- 最小成交量(吨) -->
           <el-form-item label="最小成交量(吨)">
           <el-form-item label="最小成交量(吨)">
-            <el-input disabled v-model="dataList.goodsName"></el-input>
+            <el-input disabled v-model="dataList.minimumVolume"></el-input>
           </el-form-item>
           </el-form-item>
           <!--类型-->
           <!--类型-->
           <el-form-item label="类型" span="1">
           <el-form-item label="类型" span="1">
-            <el-select disabled v-model="dataList.weight" maxlength="120" />
+            <el-input disabled v-model="dataList.salePlanType" maxlength="120" />
           </el-form-item>
           </el-form-item>
           <!-- 价格类型 -->
           <!-- 价格类型 -->
           <el-form-item label="价格类型">
           <el-form-item label="价格类型">
-            <el-select v-model="dataList.grade" placeholder class="typeselect" disabled></el-select>
+            <el-input v-model="dataList.priceType" placeholder class="typeselect" disabled></el-input>
           </el-form-item>
           </el-form-item>
+          <ws-form-item v-show="dataList.salePlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
+            <el-input v-model="dataList.basisPrice" disabled   maxlength="120" size="small" />
+          </ws-form-item>
           <!--销售价格(元)-->
           <!--销售价格(元)-->
-          <el-form-item label="销售价格(元)">
-            <el-input disabled v-model="dataList.bulkDensity" maxlength="120" size="small" />
-          </el-form-item>
+         <ws-form-item v-show="dataList.salePlanType=='现货'" label="销售价格(元)" span="1" prop="salePrice">
+            <el-input
+            disabled
+              v-model="dataList.salePrice"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
           <!--出货库-->
           <!--出货库-->
           <el-form-item label="出货库" span="1">
           <el-form-item label="出货库" span="1">
-            <el-select disabled v-model="dataList.waterContent" maxlength="120" size="small" />
+            <el-input disabled v-model="dataList.sendWarehouse" maxlength="120" size="small" />
           </el-form-item>
           </el-form-item>
           <!--出货库所在地区-->
           <!--出货库所在地区-->
           <el-form-item label="出货库所在地区" span="1">
           <el-form-item label="出货库所在地区" span="1">
-            <el-input disabled v-model="dataList.unitPrice" maxlength="120" size="small" />
+           {{dataList.sendPrivate}}{{dataList.sendCity}}{{dataList.sendArea}}
           </el-form-item>
           </el-form-item>
           <!--运费承担方-->
           <!--运费承担方-->
           <el-form-item label="运费承担方">
           <el-form-item label="运费承担方">
-            <el-input disabled v-model="dataList.unitPrice" maxlength="120" size="small" />
+            <el-input disabled v-model="dataList.freightPayer" maxlength="120" size="small" />
           </el-form-item>
           </el-form-item>
           <!--包装方式-->
           <!--包装方式-->
           <el-form-item label="包装方式">
           <el-form-item label="包装方式">
-            <el-select disabled v-model="dataList.agent" filterable :filter-method="dataFilter"></el-select>
+            <el-input disabled v-model="dataList.packingType" filterable :filter-method="dataFilter"></el-input>
           </el-form-item>
           </el-form-item>
           <!--装袋备注=-->
           <!--装袋备注=-->
-          <el-form-item label="装袋备注">
-            <el-input disabled v-model="dataList.businessDescribe" size="small" />
+          <el-form-item label="装袋备注" v-if="dataList.packingType == '大袋' || dataList.packingType == '小袋'">
+            <el-input disabled v-model="dataList.baggingNotes" size="small" />
           </el-form-item>
           </el-form-item>
           <!-- 卖方 -->
           <!-- 卖方 -->
           <el-form-item label="卖方">
           <el-form-item label="卖方">
-            <el-input disabled v-model="dataList.unitPrice" maxlength="120" size="small" />
+            <el-input disabled v-model="dataList.seller" maxlength="120" size="small" />
           </el-form-item>
           </el-form-item>
           <!-- 卖方电话 -->
           <!-- 卖方电话 -->
           <el-form-item label="卖方电话">
           <el-form-item label="卖方电话">
-            <el-input disabled v-model="dataList.agent" filterable :filter-method="dataFilter"></el-input>
+            <el-input disabled v-model="dataList.sellerPhone" filterable :filter-method="dataFilter"></el-input>
           </el-form-item>
           </el-form-item>
           <div class="small-title"></div>
           <div class="small-title"></div>
         </el-form>
         </el-form>
@@ -89,48 +97,48 @@
         </div>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <el-form-item label="水分(%)<=">
           <el-form-item label="水分(%)<=">
-            <el-input disabled v-model="dataList.warehouseName" class="typeselect" />
+            <el-input disabled v-model="dataList.waterContent" class="typeselect" />
           </el-form-item>
           </el-form-item>
-
           <!-- 容重 -->
           <!-- 容重 -->
           <el-form-item label="容重(g/l)<=">
           <el-form-item label="容重(g/l)<=">
-            <el-input disabled v-model="dataList.warehouseName" class="typeselect" />
+            <el-input disabled v-model="dataList.bulkDensity" class="typeselect" />
           </el-form-item>
           </el-form-item>
           <!-- 热损伤 -->
           <!-- 热损伤 -->
           <el-form-item label="热损伤(%)<=">
           <el-form-item label="热损伤(%)<=">
-            <el-input disabled v-model="dataList.inOutType" class="typeselect" />
+            <el-input disabled v-model="dataList.jiaorenli" class="typeselect" />
           </el-form-item>
           </el-form-item>
           <!-- 杂质 -->
           <!-- 杂质 -->
           <el-form-item label="杂质(%)<=">
           <el-form-item label="杂质(%)<=">
-            <el-input disabled v-model="dataList.contractNo" class="typeselect" />
+            <el-input disabled v-model="dataList.impurity" class="typeselect" />
           </el-form-item>
           </el-form-item>
-          <!-- 货名 -->
+          <!-- 霉变粒 -->
           <el-form-item label="霉变粒(%)<=">
           <el-form-item label="霉变粒(%)<=">
-            <el-input disabled v-model="dataList.goodsName" />
+            <el-input disabled v-model="dataList.mildewGrain" />
           </el-form-item>
           </el-form-item>
           <!--不完善粒(%)<=-->
           <!--不完善粒(%)<=-->
           <el-form-item label="不完善粒(%)<=" span="1">
           <el-form-item label="不完善粒(%)<=" span="1">
-            <el-input disabled v-model="dataList.weight" maxlength="120" />
+            <el-input disabled v-model="dataList.imperfectGrain" maxlength="120" />
           </el-form-item>
           </el-form-item>
           <!-- 蛋白(%)<= -->
           <!-- 蛋白(%)<= -->
           <el-form-item label="蛋白(%)<=" span="1">
           <el-form-item label="蛋白(%)<=" span="1">
-            <el-input v-model="dataList.grade" placeholder class="typeselect" disabled />
+            <el-input v-model="dataList.protein" placeholder class="typeselect" disabled />
           </el-form-item>
           </el-form-item>
           <!--粒形-->
           <!--粒形-->
           <el-form-item label="粒形" span="1">
           <el-form-item label="粒形" span="1">
-            <el-select disabled v-model="dataList.bulkDensity" maxlength="120" size="small" />
+            <el-input disabled v-model="dataList.grain" maxlength="120" size="small" />
           </el-form-item>
           </el-form-item>
           <!--水分(%)<=-->
           <!--水分(%)<=-->
           <el-form-item label="品级" span="1">
           <el-form-item label="品级" span="1">
-            <el-select disabled v-model="dataList.waterContent" maxlength="120" size="small" />
+            <el-input disabled v-model="dataList.grade" maxlength="120" size="small" />
           </el-form-item>
           </el-form-item>
           <!--产地-->
           <!--产地-->
           <el-form-item label="产地" span="1">
           <el-form-item label="产地" span="1">
-            <el-select disabled v-model="dataList.unitPrice" maxlength="120" size="small" />
+            <!-- <el-input disabled></el-input>    -->
+            {{dataList.outputPrivate}}{{dataList.outputCity}}
           </el-form-item>
           </el-form-item>
           <!--产出年份-->
           <!--产出年份-->
           <el-form-item label="产出年份" span="1">
           <el-form-item label="产出年份" span="1">
-            <el-select v-model="dataList.unitPrice" size="small" disabled />
+            <el-input v-model="dataList.outputYear" size="small" disabled />
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
       </div>
       </div>
@@ -143,11 +151,8 @@
 </template>
 </template>
 <script>
 <script>
 import {
 import {
-  getwarehousename,
-  xialaNo,
-  addoreditoutput,
-  outexamine
-} from '@/model/tasksport/index'
+  saleLook,
+} from '@/model/salesManagement/index'
 import { packList } from '@/model/contarct/index'
 import { packList } from '@/model/contarct/index'
 import { pullDown, getstaff } from '@/model/warehouse/index'
 import { pullDown, getstaff } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import { downloadFile } from '@/utils/batchDown'
@@ -260,7 +265,7 @@ export default {
       this.$router.go(-1)
       this.$router.go(-1)
     },
     },
     returnsales() {
     returnsales() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.$router.push({ path: 'salesPlanList' })
     },
     },
     // 获取当前年月日
     // 获取当前年月日
     getdate() {
     getdate() {
@@ -334,7 +339,7 @@ export default {
             .toPromise()
             .toPromise()
             .then(response => {
             .then(response => {
               this.$message.success('添加成功')
               this.$message.success('添加成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+              this.$router.push({ path: 'salesPlanList' })
             })
             })
         } else {
         } else {
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
@@ -344,28 +349,8 @@ export default {
     },
     },
     //关闭
     //关闭
     close() {
     close() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.$router.push({ path: 'salesPlanList' })
     },
     },
-    //提交按钮
-    // submit() {
-    //   if (this.dataList.taskTypeKey == 1) {
-    //     this.dataList.inOutTaskNo = this.inOutTaskNo
-    //     this.requestadd(this.dataList)
-    //   } else if (this.dataList.taskTypeKey == 2) {
-    //     this.dataList.inOutTaskNo = this.inOutTaskNo1
-    //     this.requestadd(this.dataList)
-    //   } else if (
-    //     this.dataList.taskTypeKey == 3 ||
-    //     this.dataList.taskTypeKey == 4
-    //   ) {
-    //     this.dataList.inOutTaskNo = this.inOutTaskNo
-    //     this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
-    //     this.requestadd(this.dataList, 'repetition')
-    //     this.dataList1.inOutTaskNo = this.inOutTaskNo1
-    //     this.dataList1.relevanceId = this.dataList.relevanceId
-    //     this.requestadd(this.dataList1, 'repetition')
-    //   }
-    // },
     selectwarehouseName() {},
     selectwarehouseName() {},
     tarechange(e) {
     tarechange(e) {
       if (this.dataList.grossWeight && this.dataList.tare) {
       if (this.dataList.grossWeight && this.dataList.tare) {
@@ -434,21 +419,13 @@ export default {
       var Rand = Math.random()
       var Rand = Math.random()
       return Min + Math.round(Rand * Range)
       return Min + Math.round(Rand * Range)
     },
     },
-    getList() {
-      outexamine({ relevanceId: this.$route.query.relevanceId })
-        .toPromise()
+    getList(){
+      saleLook({
+        id: this.$route.query.id
+      })
+      .toPromise()
         .then(response => {
         .then(response => {
-          if (response.length > 1) {
-            this.dataList = response[0]
-            this.dataList1 = response[1]
-          } else {
-            console.log(response[0].taskTypeKey)
-            if (response[0].taskTypeKey == 2) {
-              this.dataList1 = response[0]
-            } else {
-              this.dataList = response[0]
-            }
-          }
+          this.dataList = response
         })
         })
     },
     },
 
 

+ 3 - 9
src/views/salesManagement/salesPlanOrderList.vue

@@ -1063,17 +1063,11 @@ export default {
         .toPromise()
         .toPromise()
         .then(response => {
         .then(response => {
           this.warehouseList = response
           this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
         })
     },
     },
-    // loaddata(){
-    //   chengList({
-    //      compId: sessionStorage.getItem('ws-pf_compId'),
-    //   })
-    //   .toPromise()
-    //   .then(response => {
-    //       this.warehouseList = response
-    //     })
-    // },
     handleRemove(file) {
     handleRemove(file) {
       console.log(file)
       console.log(file)
     },
     },

+ 42 - 1
src/views/statisticalReport/purchaseClosingCashierList.vue

@@ -143,7 +143,10 @@
           class="wenzi"
           class="wenzi"
           :data="warehouseList.records"
           :data="warehouseList.records"
           style="width: 100%; margin-top: 20px"
           style="width: 100%; margin-top: 20px"
-          height="780"
+          ref="warehouseList"
+          border
+          :summary-method="getSummaries"
+          show-summary
           @selection-change="handleSelectionChange"
           @selection-change="handleSelectionChange"
         >
         >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="selection" width="55"></el-table-column>
@@ -285,6 +288,38 @@ export default {
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
   methods: {
   methods: {
+    updated() {
+      this.$nextTick(() => {
+        this.$refs.warehouseList.doLayout()
+      })
+    },
+    //合计
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+        } else if (index === 5 || index === 7 || index === 8 || index === 9) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+          } else {
+            sums[index] = '元'
+          }
+        } else {
+          sums[index] = '--'
+        }
+      })
+      return sums
+    },
     //成交
     //成交
     submit() {
     submit() {
       if (!this.warehouseList.transactionPrice) {
       if (!this.warehouseList.transactionPrice) {
@@ -789,6 +824,12 @@ hr {
 .el-input-number--small {
 .el-input-number--small {
   width: 123% !important;
   width: 123% !important;
 }
 }
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
 // .danjia{
 // .danjia{
 //   width: 9px;
 //   width: 9px;
 //   height: 9px;
 //   height: 9px;

+ 42 - 1
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -191,7 +191,10 @@
           class="wenzi"
           class="wenzi"
           :data="warehouseList.records"
           :data="warehouseList.records"
           style="width: 100%; margin-top: 20px"
           style="width: 100%; margin-top: 20px"
-          height="780"
+          ref="warehouseList"
+          border
+          :summary-method="getSummaries"
+          show-summary
         >
         >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -353,6 +356,38 @@ export default {
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
   methods: {
   methods: {
+    updated() {
+      this.$nextTick(() => {
+        this.$refs.warehouseList.doLayout()
+      })
+    },
+    //合计
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+        } else if (index === 5 || index === 7 || index === 8 || index === 9) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+          } else {
+            sums[index] = '元'
+          }
+        } else {
+          sums[index] = '--'
+        }
+      })
+      return sums
+    },
     //成交
     //成交
     submit() {
     submit() {
       if (!this.warehouseList.transactionPrice) {
       if (!this.warehouseList.transactionPrice) {
@@ -854,6 +889,12 @@ hr {
 .el-input-number--small {
 .el-input-number--small {
   width: 123% !important;
   width: 123% !important;
 }
 }
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
 // .danjia{
 // .danjia{
 //   width: 9px;
 //   width: 9px;
 //   height: 9px;
 //   height: 9px;

+ 42 - 1
src/views/statisticalReport/salesClosingCashierList.vue

@@ -159,8 +159,11 @@
           class="wenzi"
           class="wenzi"
           :data="warehouseList.records"
           :data="warehouseList.records"
           style="width: 100%; margin-top: 20px"
           style="width: 100%; margin-top: 20px"
-          height="780"
           @selection-change="handleSelectionChange"
           @selection-change="handleSelectionChange"
+          ref="warehouseList"
+          border
+          :summary-method="getSummaries"
+          show-summary
         >
         >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -307,6 +310,38 @@ export default {
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
   methods: {
   methods: {
+    updated() {
+      this.$nextTick(() => {
+        this.$refs.warehouseList.doLayout()
+      })
+    },
+    //合计
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+        } else if (index === 5 || index === 7 || index === 8 || index === 9) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+          } else {
+            sums[index] = '元'
+          }
+        } else {
+          sums[index] = '--'
+        }
+      })
+      return sums
+    },
     //成交
     //成交
     submit() {
     submit() {
       if (!this.warehouseList.transactionPrice) {
       if (!this.warehouseList.transactionPrice) {
@@ -811,6 +846,12 @@ hr {
 .el-input-number--small {
 .el-input-number--small {
   width: 123% !important;
   width: 123% !important;
 }
 }
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
 // .danjia{
 // .danjia{
 //   width: 9px;
 //   width: 9px;
 //   height: 9px;
 //   height: 9px;

+ 54 - 32
src/views/statisticalReport/salesDeliveryReportList.vue

@@ -113,7 +113,9 @@
             :append-to-body="true"
             :append-to-body="true"
           >
           >
             <el-form :model="form">
             <el-form :model="form">
-               <div style=" margin-left: 30%;"><h4>合计发票金额{{}}元,确定提交?</h4></div>
+              <div style=" margin-left: 30%;">
+                <h4>合计发票金额{{}}元,确定提交?</h4>
+              </div>
             </el-form>
             </el-form>
             <div slot="footer" class="dialog-footer">
             <div slot="footer" class="dialog-footer">
               <el-button @click="dialogFormVisible3 = false">取 消</el-button>
               <el-button @click="dialogFormVisible3 = false">取 消</el-button>
@@ -139,7 +141,7 @@
               <el-button @click="dialogFormVisible3 = false">取 消</el-button>
               <el-button @click="dialogFormVisible3 = false">取 消</el-button>
               <el-button type="primary" @click="dialogFormVisible3 = false">提 交</el-button>
               <el-button type="primary" @click="dialogFormVisible3 = false">提 交</el-button>
             </div>
             </div>
-           </el-dialog> -->
+          </el-dialog>-->
           <ws-button type="primary" @click="dialogFormVisible4=true">付款</ws-button>
           <ws-button type="primary" @click="dialogFormVisible4=true">付款</ws-button>
 
 
           <el-dialog
           <el-dialog
@@ -258,10 +260,11 @@
         <el-table
         <el-table
           class="wenzi"
           class="wenzi"
           :data="warehouseList.records"
           :data="warehouseList.records"
-          style="width: 100%; margin-top: 20px"
-          height="780"
+          style="width: 100%; margin-top: 20px; height: 780;"
+          ref="warehouseList"
+          border
+          :summary-method="getSummaries"
           show-summary
           show-summary
-         
         >
         >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -410,38 +413,45 @@ export default {
       accessoryTFs: false
       accessoryTFs: false
     }
     }
   },
   },
+
   activated() {
   activated() {
     // this.loaddata()
     // this.loaddata()
     this.getList()
     this.getList()
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
   methods: {
   methods: {
-//       getSummaries (param) {
-//   const { columns, data } = param
-//   const sums = []
-//   columns.forEach((column, index) => {
-//   if (index === 0) {
-//    sums[index] = '总计'
-//   } else if (index === 5 || index === 6) {
-//    const values = data.map(item => Number(item[column.property]))
-//    if (!values.every(value => isNaN(value))) {
-//    sums[index] = values.reduce((prev, curr) => {
-//     const value = Number(curr)
-//     if (!isNaN(value)) {
-//     return prev + curr
-//     } else {
-//     return prev
-//     }
-//    }, 0)
-//    } else {
-//    sums[index] = 'N/A'
-//    }
-//   } else {
-//    sums[index] = '--'
-//   }
-//   })
-//   return sums
-//  },
+    updated() {
+      this.$nextTick(() => {
+        this.$refs.warehouseList.doLayout()
+      })
+    },
+    //合计
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+        } else if (index === 5 || index === 7 || index === 8 || index === 9) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+          } else {
+            sums[index] = '元'
+          }
+        } else {
+          sums[index] = '--'
+        }
+      })
+      return sums
+    },
     //成交
     //成交
     submit() {
     submit() {
       if (!this.warehouseList.transactionPrice) {
       if (!this.warehouseList.transactionPrice) {
@@ -727,7 +737,6 @@ export default {
 .el-button--primary {
 .el-button--primary {
   background-color: #5878e8;
   background-color: #5878e8;
   border-color: #5878e8;
   border-color: #5878e8;
- 
 }
 }
 .el-button--default {
 .el-button--default {
   color: #8890b1;
   color: #8890b1;
@@ -944,6 +953,19 @@ hr {
 .el-input-number--small {
 .el-input-number--small {
   width: 123% !important;
   width: 123% !important;
 }
 }
+.wemzi {
+  height: 780;
+}
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
+// .el-table {   overflow: visible !important; }
+// .el-table__footer-wrapper {
+//     margin-top: -23%;
+// }
 // .danjia{
 // .danjia{
 //   width: 9px;
 //   width: 9px;
 //   height: 9px;
 //   height: 9px;

+ 1 - 1
vue.config.js

@@ -145,7 +145,7 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.121:8090/',
-        target: 'http://192.168.1.121:8090/',
+        target: 'http://192.168.1.116:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://product-server.winsea.com/',

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików