Jelajahi Sumber

前端孟祥旭

mxx 3 tahun lalu
induk
melakukan
056ea08ebd

+ 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_DELETE = '/priceConfirmationSheet/api/deletePriceConfirmationSheet'
+export const API_POST_CONFIRMATIONSHEET_DELETE = '/priceConfirmationSheet/api/deletePriceConfirmationSheet'
+
+//编辑时查看点价确认单
+export const API_GET_GETINFO = '/priceConfirmationSheet/getInfo'

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

@@ -19,6 +19,7 @@ import {
     API_GET_SELECTCONFIRMATIONSHEET,
     API_POST_CONFIRMATIONSHEET_EDIT,
     API_POST_CONFIRMATIONSHEET_ADD,
+    API_GET_GETINFO,
     API_POST_CONFIRMATIONSHEET_DELETE,
     API_GET_STAFF
 } 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 getInfo = appRx.get(API_GET_GETINFO, errorCatcher, errorHandle, filter)

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

@@ -159,7 +159,6 @@
             @click="editClick(scope.row)"
             alt=""
           />
-          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
         </template>
       </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
       }
-      if (this.selectedOptions1.length == 0) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
           message: '请选择交货所在地区!',
           type: 'warning',
         })
         return
       }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择产地!',
+          type: 'warning',
+        })
+        return
+      }
       
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
@@ -1188,6 +1195,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+        this.$message({
+          message: '请选择转基因',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=

+ 133 - 97
src/views/contractManagement/futuresPurchaseContractEdit.vue

@@ -21,7 +21,6 @@
           返回</el-button
         >
       </el-col>
-      
     </el-row>
     <ws-form
       ref="deptBudgetList"
@@ -34,13 +33,15 @@
           &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
           标记的条目提交后不可修改。
         </p>
-        <div class="queren"><el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="confirmationsheet()"
-          >确认单</el-button
-        ></div>
+        <div class="queren">
+          <el-button
+            class="bg-bottom"
+            type="primary"
+            size="small"
+            @click="confirmationsheet()"
+            >确认单</el-button
+          >
+        </div>
       </div>
       <ws-info-table>
         <!-- 合同编号 -->
@@ -63,7 +64,7 @@
           />
         </ws-form-item>
         <!--买方-->
-        <ws-form-item label="买方" span="1" prop="buyer" >
+        <ws-form-item label="买方" span="1" prop="buyer">
           <ws-input
             v-model="deptBudgetList.buyer"
             placeholder="请输入买方名称"
@@ -100,7 +101,7 @@
           {{ deptBudgetList.deliverType1 }}
         </ws-form-item>
         <!--卖方-->
-        <ws-form-item label="卖方" span="1" prop="seller" >
+        <ws-form-item label="卖方" span="1" prop="seller">
           <ws-input
             v-model="deptBudgetList.seller"
             placeholder="请输入卖方名称"
@@ -108,7 +109,7 @@
             size="small"
           />
         </ws-form-item>
-        
+
         <!--包装方式-->
         <ws-form-item label="包装方式" span="1" prop="packingMethod">
           <ws-select
@@ -252,21 +253,21 @@
           />
         </ws-form-item>
         <!--收货库-->
-          <el-form-item label="收货库" span="1" prop="receiveWarehouse">
-            <el-select
-              v-model="deptBudgetList.receiveWarehouse"
-              placeholder="请选择收货库"
-              class="typeselect"
-              @change="selectwarehouseName"
-            >
-              <el-option
-                v-for="item in warehouseNameList"
-                :key="item.constKey"
-                :label="item.warehouseName"
-                :value="item.warehouseName"
-              />
-            </el-select>
-          </el-form-item>
+        <el-form-item label="收货库" span="1" prop="receiveWarehouse">
+          <el-select
+            v-model="deptBudgetList.receiveWarehouse"
+            placeholder="请选择收货库"
+            class="typeselect"
+            @change="selectwarehouseName"
+          >
+            <el-option
+              v-for="item in warehouseNameList"
+              :key="item.constKey"
+              :label="item.warehouseName"
+              :value="item.warehouseName"
+            />
+          </el-select>
+        </el-form-item>
         <!--合约号-->
         <ws-form-item label="合约号" span="1" prop="contractNumber">
           <ws-input
@@ -324,7 +325,7 @@
             value-format="yyyy-MM-dd"
           />
         </ws-form-item>
-        
+
         <!--交货日期(起)-->
         <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
           <ws-date-picker
@@ -365,8 +366,7 @@
             value-format="yyyy-MM-dd"
           />
         </ws-form-item>
-        
-    </ws-info-table>
+      </ws-info-table>
 
       <div class="wenzi">
         <h3>货物信息</h3>
@@ -376,13 +376,13 @@
       <ws-info-table>
         <!--货名-->
         <ws-form-item
-            class="readonly"
-            label="货名"
-            span="1"
-            prop="waterContent"
-          >
-            {{ deptBudgetList.contractGoodsInfo.goodsName }}
-          </ws-form-item>
+          class="readonly"
+          label="货名"
+          span="1"
+          prop="waterContent"
+        >
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
         <!--水分(%)<=-->
         <ws-form-item label="水分(%)" span="1" prop="waterContent">
           <ws-input
@@ -486,16 +486,15 @@
         <!--产地-->
         <ws-form-item label="产地" span="1" prop="protein">
           <el-cascader
-              :options="options1_"
-              v-model="selectedOptions1"
-              clearable
-              size="large"
-              placeholder="请选择产地"
-              @change="handleChange1"
-              style="width:200%"
-            />
+            :options="options1_"
+            v-model="selectedOptions1"
+            clearable
+            size="large"
+            placeholder="请选择产地"
+            @change="handleChange1"
+            style="width: 200%"
+          />
         </ws-form-item>
-
       </ws-info-table>
 
       <div class="wenzi">
@@ -572,22 +571,23 @@
         placeholder="请输入备注信息,不超过200字"
         maxlength="200"
       />
-      
+
       <el-upload
         class="upload-demo"
         action="https://www.zthymaoyi.com/upload/admin"
-         :on-success="
-            (res, file) => {
-              uploadSuccessHandle(res)
-            }
-          "
+        :on-success="
+          (res, file) => {
+            uploadSuccessHandle(res)
+          }
+        "
         multiple
         :limit="3"
         :file-list="fileList"
       >
         <el-button size="small" type="primary">点击上传</el-button>
         <div slot="tip" class="el-upload__tip">
-          推荐格式.jpg, .jpeg, .png, .gif, .pdf, .doc, .zip, .rar,单个文件大小不超过10M
+          推荐格式.jpg, .jpeg, .png, .gif, .pdf, .doc, .zip,
+          .rar,单个文件大小不超过10M
         </div>
       </el-upload>
     </ws-form>
@@ -603,7 +603,12 @@
   </div>
 </template>
 <script>
-import { regionData,provinceAndCityDataPlus, CodeToText, TextToCode } from 'element-china-area-data'
+import {
+  regionData,
+  provinceAndCityDataPlus,
+  CodeToText,
+  TextToCode,
+} from 'element-china-area-data'
 import {
   packList,
   getwarehousename,
@@ -660,7 +665,7 @@ export default {
       transgeneList: [],
       unitList: [],
       options_: regionData,
-      options1_:provinceAndCityDataPlus,
+      options1_: provinceAndCityDataPlus,
       staffList: [],
       packtypeList: [],
       goodnameList: [],
@@ -676,9 +681,9 @@ export default {
       },
       acceptanceCheck: {},
       compId: sessionStorage.getItem('ws-pf_compId'),
-      addressUrls:[],
-      addressUrl:'',
-      fileList:[],
+      addressUrls: [],
+      addressUrl: '',
+      fileList: [],
     }
   },
 
@@ -734,7 +739,7 @@ export default {
     },
     loaddata() {
       // 数据
-       examineList({ id: this.$route.query.id })
+      examineList({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
@@ -743,6 +748,10 @@ export default {
           tmp[0] = TextToCode[response.deliveryProvince].code
           tmp[1] =
             TextToCode[response.deliveryProvince][response.deliveryCity].code
+          tmp[2] =
+            TextToCode[response.deliveryProvince][response.deliveryCity][
+              response.deliveryArea
+            ].code
 
           if (tmp[0] == 810000 || tmp[0] == 820000) {
             tmp[2] = null
@@ -752,17 +761,19 @@ export default {
                 response.deliveryArea
               ].code
           }
-          this.selectedOptions1 = tmp1
+          this.selectedOptions = tmp
           var tmp1 = []
           tmp1[0] = TextToCode[response.contractGoodsInfo.outputPrivate].code
           tmp1[1] =
             TextToCode[response.contractGoodsInfo.outputPrivate][response.contractGoodsInfo.outputCity].code
+          this.selectedOptions1 = tmp1
           if (this.deptBudgetList.deliverType == 1) {
             this.deptBudgetList.deliverType1 = '我方自提'
           } else if (this.deptBudgetList.deliverType == 2) {
             this.deptBudgetList.deliverType1 = '对方送货'
           }
-          if(this.deptBudgetList.addressUrl != null){
+
+          if (this.deptBudgetList.addressUrl != null) {
             this.addressUrls = this.deptBudgetList.addressUrl.split(',')
             this.fileList = this.deptBudgetList.addressUrl.split(',')
           }
@@ -788,14 +799,14 @@ export default {
         .then((response) => {
           this.gradeList = response
         })
-        //转基因
+      //转基因
       packList({ constId: 'CON7' })
         .toPromise()
         .then((response) => {
           this.transgeneList = response
         })
-        //收货库
-        getwarehousename({
+      //收货库
+      getwarehousename({
         compId: this.compId,
         warehouseType: 1,
       })
@@ -827,8 +838,8 @@ export default {
     },
     // 上传附件
     uploadSuccessHandle(e) {
-      this.addressUrl += e.url+''
-       this.addressUrls.push(this.addressUrl.split(','))
+      this.addressUrl += e.url + ''
+      this.addressUrls.push(this.addressUrl.split(','))
     },
     getUnitList() {
       xiala({
@@ -1240,14 +1251,21 @@ export default {
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
           message: '请选择交货所在地区!',
           type: 'warning',
         })
         return
       }
-      
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择产地!',
+          type: 'warning',
+        })
+        return
+      }
+
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
           message: '请选择交货日期(起)',
@@ -1301,6 +1319,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+        this.$message({
+          message: '请选择转基因',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.impurity ||
         (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
@@ -1391,13 +1416,12 @@ export default {
       }
       if (
         !this.deptBudgetList.contractGoodsInfo.protein ||
-        (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
-          '.'
-        ) != -1 &&
+        (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf('.') !=
+          -1 &&
           String(this.deptBudgetList.contractGoodsInfo.protein).length -
-            (String(
-              this.deptBudgetList.contractGoodsInfo.protein
-            ).indexOf('.') +
+            (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
+              '.'
+            ) +
               1) >
             2)
       ) {
@@ -1485,18 +1509,28 @@ export default {
       }
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
-          this.deptBudgetList.contractGoodsInfo.outputPrivate = CodeToText[this.selectedOptions1[0]]
-          this.deptBudgetList.contractGoodsInfo.outputCity = CodeToText[this.selectedOptions1[1]]
-         
-          this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.contractGoodsInfo.outputPrivate =
+            CodeToText[this.selectedOptions1[0]]
+          this.deptBudgetList.contractGoodsInfo.outputCity =
+            CodeToText[this.selectedOptions1[1]]
+
+          this.deptBudgetList.deliveryProvince =
+            CodeToText[this.selectedOptions[0]]
           this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions[1]]
-        
+            this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions[2]]
+
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 2
-           if(this.deptBudgetList.deliveryProvince =='澳门特别行政区' || this.deptBudgetList.deliveryProvince == '澳门特别行政区'){
+
+          if (
+            this.deptBudgetList.deliveryProvince == '澳门特别行政区' ||
+            this.deptBudgetList.deliveryProvince == '澳门特别行政区'
+          ) {
             this.deptBudgetList.deliveryArea = '特别行政区'
-          }else{ 
-                 this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
+          } else {
+            this.deptBudgetList.deliveryArea =
+              CodeToText[this.selectedOptions[2]]
+
           }
           this.deptBudgetList.addressUrl = this.addressUrls.toString()
 
@@ -1558,10 +1592,12 @@ export default {
   padding: 0 25px;
   border-left: 1px solid #cdd2dc;
   background: #fafbfc;
-  color: #8890B1;
+  color: #8890b1;
 }
-/deep/.el-form-item.is-success .el-input__inner , /deep/.el-cascader .el-input .el-input__inner, /deep/.el-textarea__inner{
-  color: #8890B1;
+/deep/.el-form-item.is-success .el-input__inner,
+/deep/.el-cascader .el-input .el-input__inner,
+/deep/.el-textarea__inner {
+  color: #8890b1;
 }
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   width: 140px;
@@ -1730,18 +1766,18 @@ export default {
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   width: 130px;
 }
-.el-textarea{
+.el-textarea {
   width: 101%;
 }
 /deep/.iconclose:before {
-    display: none;
+  display: none;
 }
 /deep/.winsea-card .card__header {
-    font-size: 14px;
-    color: #409eff;
-    padding: 0 0 20px 10px;
-    position: relative;
-    display: none;
+  font-size: 14px;
+  color: #409eff;
+  padding: 0 0 20px 10px;
+  position: relative;
+  display: none;
 }
 .addressUrls {
   width: 100%;
@@ -1760,16 +1796,16 @@ export default {
   margin: 0px 10px;
   border-radius: 3px;
 }
-.queren{
+.queren {
   margin-left: 100%;
   margin-top: -60px;
 }
 //上传文件成功标识
 /deep/.el-upload-list__item-status-label {
-    position: absolute;
-    right: 22px;
-    top: -1px;
-    line-height: inherit;
-    display: none;
+  position: absolute;
+  right: 22px;
+  top: -1px;
+  line-height: inherit;
+  display: none;
 }
 </style>

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

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

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

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

+ 79 - 56
src/views/contractManagement/priceConfirmationSheet.vue

@@ -2,7 +2,15 @@
   <div class="container">
     <el-row>
       <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 :span="12" class="bg-right">
         <el-button
@@ -25,9 +33,11 @@
       <h3>所属合同</h3>
       <p>
         &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>
         )
       </p>
@@ -53,7 +63,7 @@
         >
       </div>
     </div>
-    <div  v-for="(item,index) in deptBudgetList" :key="index">
+    <div v-for="(item, index) in deptBudgetList" :key="index">
       <div class="dianjiadanbianhao">
         <h3>点价单编号</h3>
         <p>
@@ -76,25 +86,28 @@
           </el-upload>
           <div class="shangchuan">
             <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>
           </div>
         </div>
         <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 class="center">
-        <ws-form
-          ref="deptBudgetList"
-          :model="deptBudgetList"
-        >
+        <ws-form ref="deptBudgetList" :model="deptBudgetList">
           <!--基本信息-->
           <ws-info-table>
             <ws-form-item
@@ -207,7 +220,8 @@ export default {
       // 提交类型
       submitType: true,
       contractNo: '',
-      contractType:'',
+      contractType: '',
+      id: '',
       size: 10,
       unitList: [],
       addressUrls: [],
@@ -234,52 +248,61 @@ export default {
       this.selectedOptions1 = value
     },
     returnsales() {
-      if(this.$route.query.contractType == '1'){
-        this.$router.push({ path: 'futuresSalesContractExamine',
-        query: { contractNo: this.deptBudgetList.contractNo , contractType: this.deptBudgetList.contractType } })
-      }else{
-        this.$router.push({ path: 'futuresPurchaseContractExamine',
-        query: { contractNo: this.deptBudgetList.contractNo , contractType: this.deptBudgetList.contractType } })
-      }
-      
+      // if(this.$route.query.contractType == '1'){
+      //   this.$router.push({ path: 'futuresSalesContractExamine',
+      //   query: { contractNo: this.deptBudgetList.contractNo , contractType: this.deptBudgetList.contractType } })
+      // }else{
+      //   this.$router.push({ path: 'futuresPurchaseContractExamine',
+      //   query: { contractNo: this.deptBudgetList.contractNo , contractType: this.deptBudgetList.contractType } })
+      // }
+      this.$router.go(-1)
     },
     //创建点价确认单
     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) {
-      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) {
       if (row.addressUrl === null || row.addressUrl === '') {
@@ -295,7 +318,7 @@ export default {
     getUnitList() {
       selectConfirmationSheet({
         contractNo: this.$route.query.contractNo,
-        contractType :this.$route.query.contractType,
+        contractType: this.$route.query.contractType,
       })
         .toPromise()
         .then((response) => {

+ 6 - 1
src/views/contractManagement/priceConfirmationSheetAdd.vue

@@ -2,7 +2,12 @@
   <div class="container">
     <el-row>
       <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 :span="12" class="bg-right">
         <el-button

+ 62 - 64
src/views/contractManagement/priceConfirmationSheetEdit.vue

@@ -2,14 +2,19 @@
   <div class="container">
     <el-row>
       <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 :span="12" class="bg-right">
         <el-button
           class="bg-bottom"
           type="primary"
           size="small"
-          @click="returnsales()"
+          @click="returnsales(item)"
           ><img
             width="6"
             height="10"
@@ -36,8 +41,6 @@
       <ws-form
         ref="deptBudgetList"
         :model="deptBudgetList"
-        v-for="(item, index) in deptBudgetList"
-        :key="index"
       >
         <!--基本信息-->
 
@@ -50,7 +53,7 @@
             class="readonly"
           >
             <ws-input
-              v-model="item.priceListNo"
+              v-model="deptBudgetList.priceListNo"
               placeholder="请输入点价单编号"
               maxlength="20"
               size="small"
@@ -74,8 +77,8 @@
             </el-upload>
             <div class="shangchuan">
               <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>
             </div>
           </ws-form-item>
@@ -88,7 +91,7 @@
             class="readonly"
           >
             <ws-input
-              v-model="item.varietyContractDirection"
+              v-model="deptBudgetList.varietyContractDirection"
               placeholder="请输入品种合约及方向"
               maxlength="100"
               size="small"
@@ -98,7 +101,7 @@
           <!--买方联络人-->
           <ws-form-item label="买方联络人" span="1" prop="buyer">
             <ws-input
-              v-model="item.buyer"
+              v-model="deptBudgetList.buyer"
               placeholder="请输入买方联络人"
               maxlength="120"
               size="small"
@@ -113,14 +116,14 @@
           >
             <ws-input
               @input="transactionsNumberHandChange"
-              v-model="item.transactionsNumberHand"
+              v-model="deptBudgetList.transactionsNumberHand"
               placeholder="请输入"
               maxlength="100"
               size="small"
             />&nbsp;&nbsp;&nbsp;手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;即&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <ws-input
               readonly="readonly"
-              v-model="item.transactionsNumber"
+              v-model="deptBudgetList.transactionsNumber"
               placeholder="自动计算"
               maxlength="100"
               size="small"
@@ -130,7 +133,7 @@
           <!--买方联络人电话-->
           <ws-form-item label="买方联络人电话" span="1" prop="buyerPhone">
             <ws-input
-              v-model="item.buyerPhone"
+              v-model="deptBudgetList.buyerPhone"
               placeholder="请输入买方联络人电话"
               maxlength="120"
               size="small"
@@ -144,7 +147,7 @@
             prop="transactionPrice"
           >
             <ws-input
-              v-model="item.transactionPrice"
+              v-model="deptBudgetList.transactionPrice"
               placeholder="请输入成交价格"
               maxlength="120"
               size="small"
@@ -154,7 +157,7 @@
           <!--卖方联络人-->
           <ws-form-item label="卖方联络人" span="1" prop="seller">
             <ws-input
-              v-model="item.seller"
+              v-model="deptBudgetList.seller"
               placeholder="请输入卖方联络人"
               maxlength="120"
               size="small"
@@ -164,7 +167,7 @@
           <!--成交日期-->
           <ws-form-item label="成交日期" span="1" prop="transactionDate">
             <ws-date-picker
-              v-model="item.transactionDate"
+              v-model="deptBudgetList.transactionDate"
               type="date"
               placeholder="请选择成交日期"
               value-format="yyyy-MM-dd"
@@ -174,7 +177,7 @@
           <!--卖方联络人电话-->
           <ws-form-item label="卖方联络人电话" span="1" prop="sellerPhone">
             <ws-input
-              v-model="item.sellerPhone"
+              v-model="deptBudgetList.sellerPhone"
               placeholder="请输入卖方联络人电话"
               maxlength="100"
               size="small"
@@ -184,7 +187,7 @@
           <!--备注-->
           <ws-form-item label="备注" span="1" prop="remarks">
             <ws-input
-              v-model="item.remarks"
+              v-model="deptBudgetList.remarks"
               placeholder="请输入备注,不超过200字"
               maxlength="120"
               size="small"
@@ -207,7 +210,7 @@
 <script>
 import {
   editPriceConfirmationSheet,
-  selectConfirmationSheet,
+  getInfo,
 } from '@/model/contarct/index'
 import WsUpload from '@/components/WsUpload'
 import { regionData } from 'element-china-area-data'
@@ -248,8 +251,7 @@ export default {
             priceConfirmationSheet: {
          contractNo: this.$route.query.contractNo,
          contractType :this.$route.query.contractType,
-         priceListNo: this.$route.query.priceListNo
-        // enclosureTypeFlag: '0',
+         id: this.$route.query.id,
      
       },
       addressUrls: [],
@@ -276,7 +278,7 @@ export default {
     handleChange1(value) {
       this.selectedOptions1 = value
     },
-    returnsales() {
+    returnsales(item) {
       this.$router.push({ path: 'priceConfirmationSheet',
       query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
     },
@@ -295,13 +297,10 @@ export default {
     //数据回显
     loaddata() {
       // 数据
-      selectConfirmationSheet({
+      getInfo({
         contractNo: this.$route.query.contractNo,
          contractType: this.$route.query.contractType,
-         priceListNo: this.$route.query.priceListNo
-
-
-
+         id: this.$route.query.id,
       })
         .toPromise()
         .then((response) => {
@@ -318,7 +317,7 @@ export default {
     },
     submit() {
       for (var i = 0; i < this.deptBudgetList.length; i++) {
-        if (!this.deptBudgetList[i].priceListNo) {
+        if (!this.deptBudgetList.priceListNo) {
           this.$message({
             message: '点价单编号不能为空!',
             type: 'warning',
@@ -326,8 +325,8 @@ export default {
           return
         }
         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({
             message: '点价单编号输入错误!',
@@ -335,7 +334,7 @@ export default {
           })
           return
         }
-        if (!this.deptBudgetList[i].varietyContractDirection) {
+        if (!this.deptBudgetList.varietyContractDirection) {
           this.$message({
             message: '品种合约及方向不能为空!',
             type: 'warning',
@@ -343,8 +342,8 @@ export default {
           return
         }
         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({
             message: '品种合约及方向输入错误!',
@@ -352,7 +351,7 @@ export default {
           })
           return
         }
-        if (!this.deptBudgetList[i].buyer) {
+        if (!this.deptBudgetList.buyer) {
           this.$message({
             message: '买方联络人不能为空!',
             type: 'warning',
@@ -360,8 +359,8 @@ export default {
           return
         }
         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({
             message: '买方联络人姓名输入错误!',
@@ -369,7 +368,7 @@ export default {
           })
           return
         }
-        if (!this.deptBudgetList[i].buyerPhone) {
+        if (!this.deptBudgetList.buyerPhone) {
           this.$message({
             message: '买方联络人电话不能为空!',
             type: 'warning',
@@ -377,8 +376,8 @@ export default {
           return
         }
         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({
             message: '买方联络人电话输入错误!',
@@ -386,14 +385,14 @@ export default {
           })
           return
         }
-        if (isNaN(this.deptBudgetList[i].buyerPhone)) {
+        if (isNaN(this.deptBudgetList.buyerPhone)) {
           this.$message({
             message: '卖方联络人电话输入有误!',
             type: 'warning',
           })
           return
         }
-        if (!this.deptBudgetList[i].seller) {
+        if (!this.deptBudgetList.seller) {
           this.$message({
             message: '卖方联络人不能为空!',
             type: 'warning',
@@ -401,8 +400,8 @@ export default {
           return
         }
         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({
             message: '卖方联络人姓名输入错误!',
@@ -411,14 +410,14 @@ export default {
           return
         }
 
-        if (!this.deptBudgetList[i].sellerPhone) {
+        if (!this.deptBudgetList.sellerPhone) {
           this.$message({
             message: '卖方联络人电话不能为空!',
             type: 'warning',
           })
           return
         }
-        if (isNaN(this.deptBudgetList[i].sellerPhone)) {
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
           this.$message({
             message: '卖方联络人电话输入有误!',
             type: 'warning',
@@ -426,8 +425,8 @@ export default {
           return
         }
         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({
             message: '卖方联络人电话输入有误!',
@@ -435,7 +434,7 @@ export default {
           })
           return
         }
-        if (!this.deptBudgetList[i].transactionsNumberHand) {
+        if (!this.deptBudgetList.transactionsNumberHand) {
           this.$message({
             message: '成交数量不能为空!',
             type: 'warning',
@@ -444,17 +443,17 @@ export default {
         }
 
         if (
-          isNaN(this.deptBudgetList[i].transactionsNumberHand) ||
-          (String(this.deptBudgetList[i].transactionsNumberHand).indexOf('.') !=
+          isNaN(this.deptBudgetList.transactionsNumberHand) ||
+          (String(this.deptBudgetList.transactionsNumberHand).indexOf('.') !=
             -1 &&
-            String(this.deptBudgetList[i].transactionsNumberHand).length -
-              (String(this.deptBudgetList[i].transactionsNumberHand).indexOf(
+            String(this.deptBudgetList.transactionsNumberHand).length -
+              (String(this.deptBudgetList.transactionsNumberHand).indexOf(
                 '.'
               ) +
                 1) >
               2) ||
-          this.deptBudgetList[i].transactionsNumberHand < 1 ||
-          this.deptBudgetList[i].transactionsNumberHand > 10000
+          this.deptBudgetList.transactionsNumberHand < 1 ||
+          this.deptBudgetList.transactionsNumberHand > 10000
         ) {
           this.$message({
             message: '输入成交数量有误!',
@@ -463,11 +462,11 @@ export default {
           return
         }
         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) >
               2)
         ) {
@@ -477,8 +476,8 @@ export default {
           })
           return
         }
-        if (this.deptBudgetList[i].transactionPrice) {
-          if (isNaN(this.deptBudgetList[i].transactionPrice)) {
+        if (this.deptBudgetList.transactionPrice) {
+          if (isNaN(this.deptBudgetList.transactionPrice)) {
             this.$message({
               message: '成交价格输入错误!',
               type: 'warning',
@@ -486,14 +485,14 @@ export default {
             return
           }
         }
-        if (!this.deptBudgetList[i].transactionPrice) {
+        if (!this.deptBudgetList.transactionPrice) {
           this.$message({
             message: '成交价格不能为空!',
             type: 'warning',
           })
           return
         }
-        if (!this.deptBudgetList[i].transactionDate) {
+        if (!this.deptBudgetList.transactionDate) {
           this.$message({
             message: '成交日期不能为空!',
             type: 'warning',
@@ -503,9 +502,8 @@ export default {
       }
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
-      this.deptBudgetList.enclosureTypeFlag = '0'
+      // this.deptBudgetList.enclosureTypeFlag = '0'
       this.priceConfirmationSheet = this.deptBudgetList
-      // for()
       this.$confirm(`确定提交确认单信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',

+ 3 - 3
src/views/salesManagement/salesPlanAdd.vue

@@ -318,7 +318,7 @@ export default {
       this.$router.go(-1)
     },
     returnsales() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.$router.push({ path: 'salesPlanList' })
     },
     // 获取当前年月日
     getdate() {
@@ -392,7 +392,7 @@ export default {
             .toPromise()
             .then(response => {
               this.$message.success('添加成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+              this.$router.push({ path: 'salesPlanList' })
             })
         } else {
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
@@ -402,7 +402,7 @@ export default {
     },
     //关闭
     close() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.$router.push({ path: 'salesPlanList' })
     },
     //提交按钮
     // submit() {

+ 1 - 1
src/views/salesManagement/salesPlanEdit.vue

@@ -323,7 +323,7 @@ export default {
       this.$router.go(-1)
     },
     returnsales() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.$router.push({ path: 'salesPlanList' })
     },
     // 获取当前年月日
     getdate() {

+ 339 - 112
src/views/salesManagement/salesPlanList.vue

@@ -1,27 +1,11 @@
 //销售计划
 <template>
   <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>
+    <!-- <div>
       <ws-input
         v-model="searchKeyWord"
-        placeholder="可按照合同编号和任务编号进行查找"
+        placeholder="可按销售计划编号和标题查找"
         clearable
         maxlength="500"
         type="input"
@@ -32,17 +16,44 @@
           width="16"
           height="16"
           style="
+            vertical-align: text-top;
+            position: relative;
+            top: 0px;
+            left: -8px;
+          "
+          src="../../../public/img/sousuo.png"
+          alt
+        />
+      </ws-button>
+    </div> -->
+  
+     <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;
               position: relative;
               top: 0px;
               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
       class="wenzi"
       :data="warehouseList.records"
@@ -50,14 +61,77 @@
       height="780"
     >
       <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="procurementPlanNo"
+        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="plannedPurchaseVolume"
+        label="重量(吨)"
+      ></el-table-column>
+      <el-table-column class="table_td" prop="basisPrice" label="基差(元/吨)">
+        <template slot-scope="scope">
+          <div v-if="scope.row.procurementPlanType == '期货'">
+            <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.procurementPlanType == '现货'">
+            <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="receiveWarehouse"
+        label="出货库"
+      ></el-table-column>
+      <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
           <el-popover
             placement="left"
@@ -68,17 +142,30 @@
           >
             <template>
               <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>
             </template>
             <div>
               <!-- <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 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 class="vertical-text">
                   {{ item.operateUser }}
@@ -88,9 +175,21 @@
               </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=""
+          />
         </template>
       </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">
         <template slot-scope="scope">
           <div class="record" @click="handleLook(scope.row)">查看</div>
@@ -104,15 +203,20 @@
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"
       :current-page="currentPage"
-      :page-size="pageSize"
+      :page-size="deptCircularPage.pageSize"
       layout="total, sizes, prev, pager, next, jumper"
       :total="deptBudgetTotal"
-    ></el-pagination>
+    >
+    </el-pagination>
   </div>
   <!-- </div> -->
 </template>
 <script>
-import { taskList } from '@/model/warehouse/index'
+import {
+  procurementPlan,
+  procurementDel,
+  procurementEditOther,
+} from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -121,7 +225,7 @@ export default {
   name: 'viewSpareMoney',
   components: {
     WsUpload,
-    Pagination
+    Pagination,
   },
   watch: {
     vesselId(val) {
@@ -129,7 +233,7 @@ export default {
     },
     isShow(val) {
       this.showType = val
-    }
+    },
   },
   data() {
     return {
@@ -147,33 +251,35 @@ export default {
       year: '',
       pickerOptions: {},
       value2: '',
+      handleSizeChange: '',
       deptBudgetTotal: 0,
       currentPage: 1,
-      tranTypeKey: 1,
+      // tranTypeKey: 1,
       pageSize: 10,
       searchType: 1,
       searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
-
+      pcFlag: 1,
       // 提交类型
       submitType: true,
       size: 10,
       spanArr: [],
       contractNo: '',
-      inOutTaskNo: '',
+      // inOutTaskNo: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       warehouseList: [],
       deptBudgetList: {},
-      pcFlag:1,
+      pcFlag: 1,
       historyList: [],
       pickerBeginDateBefore: {
-        disabledDate: time => {
+        disabledDate: (time) => {
           return time.getTime() > Date.now()
-        }
+        },
       },
-      accessoryTFs: false
+      accessoryTFs: false,
+      inputs: 'inputs1',
     }
   },
   activated() {
@@ -182,20 +288,18 @@ export default {
   },
   methods: {
     getList() {
-      console.log(123456)
-      taskList({
+      procurementPlan({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         contractType: this.contractType,
         tranTypeKey: this.tranTypeKey,
-        searchType: this.searchType,
         contractNo: this.contractNo,
         pcFlag: this.pcFlag,
-        inOutTaskNo: this.inOutTaskNo
+        searchKeyWord:this.searchKeyWord
       })
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.warehouseList = response
         })
     },
@@ -203,16 +307,11 @@ export default {
       this.searchType = state
       this.getList()
     },
-    delivery(item) {
+    //编辑
+    handleEdit(row) {
       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) {
@@ -246,15 +345,48 @@ export default {
         }
       })
     },
+    //添加
+    handleAdd() {
+      this.$router.push({
+        name: 'salesPlanAdd',
+      })
+    },
     //查看
     handleLook(row) {
       this.$router.push({
-        path: 'warehouseManagementPutOutLook',
+        name: 'salesPlanLook',
         query: {
-          relevanceId: row.relevanceId
-        }
+          id: row.id,
+        },
       })
     },
+    handleDelete(row) {
+      var handleDelete = ' '
+      if (row.handleDelete == '') {
+      }
+      this.$confirm(`销售计划删除后不可恢复,是否确定删除?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          procurementDel({ 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() {
       this.$router.push({ path: 'warehouseManagementList' })
@@ -265,7 +397,7 @@ export default {
         'Y+': date.getFullYear().toString(), // 年
         'm+': (date.getMonth() + 1).toString(), // 月
         'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString() // 时
+        'H+': date.getHours().toString(), // 时
         // "M+": date.getMinutes().toString(),         // 分
         // "S+": date.getSeconds().toString()          // 秒
         // 有其他格式化字符需求可以继续添加,必须转化成字符串
@@ -296,34 +428,67 @@ export default {
     },
     editClick(row) {
       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(() => {
+            procurementEditOther({
+              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(() => {
+            procurementEditOther({
+              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
+          })
+      }
+      //cancelButtonClass: "btn-custom-cancel"
     },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
@@ -349,7 +514,7 @@ export default {
     handleExamine(row) {
       this.$router.push({
         name: 'salesContractExamine',
-        query: { id: row.id }
+        query: { id: row.id },
       })
     },
     // 关闭 dialog时 处理文件url 初始化upload组件
@@ -359,13 +524,13 @@ export default {
     history(row) {
       billoperatehis({ id: row.id })
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.historyList = response
         })
     },
     //查找
     find() {
-      this.currentPage = 1
+      // this.searchKeyWord = 1
       this.getList()
     },
     async exportlist() {
@@ -378,20 +543,77 @@ export default {
           searchType: this.searchType,
           searchKeyWord: this.searchKeyWord,
           startDate: this.startDate,
-          endDate: this.endDate
+          endDate: this.endDate,
         },
         {},
         { responseType: 'blob' }
       ).toPromise()
       downloadFile({
         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.procurementPlanType == '期货') {
+        this.$confirm(`确定要修改基差?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            procurementEditOther({
+              flag: 1,
+              basisPrice: row.basisPrice,
+              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.procurementPlanType == '现货') {
+        this.$confirm(`确定要修改单价?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            procurementEditOther({
+              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>
 <style lang="scss" scoped>
@@ -473,9 +695,6 @@ export default {
   height: 12px;
   background: #e9ecf7;
 }
-// .el-row{
-//     height: 150px;
-// }
 .base_header_layout .grid-content {
   margin-top: 80px;
 }
@@ -500,12 +719,15 @@ export default {
 }
 .executory {
   background: #ff9f24;
+  margin-right: 3px;
 }
 .inExecution {
   background: #5878e8;
+  margin-right: 3px;
 }
 .done {
   background: #50cad4;
+  margin-right: 3px;
 }
 .record,
 .adjustment {
@@ -568,7 +790,6 @@ export default {
 .el-button--primary {
   background-color: #5878e8;
   border-color: #5878e8;
-  // margin-left: 85%;
   margin-top: 20px;
 }
 //导航条样式
@@ -589,19 +810,25 @@ export default {
 }
 .but {
   margin-left: 30%;
-  /* margin-top: -32px; */
   overflow: auto;
-  /* float: left; */
-  /* margin-left: 1px; */
   margin-left: -10px;
 }
 .el-input--small {
   font-size: 13px;
   width: 390px;
-  margin-left: 74%;
 }
 /deep/.el-table .el-table__header .cell,
 .el-table .el-table__body .cell {
   text-align: center;
 }
-</style>
+.inputChenge {
+  width: 50%;
+  display: inline-flex;
+}
+.inputs1 {
+  border: none;
+}
+// .inputChenge>>>.el-input__inner{
+// border: none;
+// }
+</style>

+ 2 - 2
src/views/salesManagement/salesPlanLook.vue

@@ -260,7 +260,7 @@ export default {
       this.$router.go(-1)
     },
     returnsales() {
-      this.$router.push({ path: 'procurementPlanList' })
+      this.$router.push({ path: 'salesPlanList' })
     },
     // 获取当前年月日
     getdate() {
@@ -334,7 +334,7 @@ export default {
             .toPromise()
             .then(response => {
               this.$message.success('添加成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+              this.$router.push({ path: 'salesPlanList' })
             })
         } else {
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))