gjy 3 年 前
コミット
5f0348c157

+ 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'

+ 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)

+ 11 - 22
src/views/contractManagement/priceConfirmationSheet.vue

@@ -70,20 +70,7 @@
           <template>{{ item.priceListNo }}</template>
         </p>
         <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">
             <template>
               <span v-if="item.enclosureTypeFlag == 0">未上传</span>
@@ -248,14 +235,16 @@ 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 } })
-      // }
-      this.$router.go(-1)
+      if(this.$route.query.contractType == '1'){
+        this.$router.push({ path: 'futuresSalesContractExamine',
+        query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
+        // this.$router.go(-1)
+      }else{
+        this.$router.push({ path: 'futuresPurchaseContractExamine',
+        query: { contractNo: this.$route.query.contractNo, contractType: this.$route.query.contractType } })
+        // this.$router.go(-1)
+      }
+      // 
     },
     //创建点价确认单
     sheetAdd() {

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

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

+ 9 - 6
src/views/contractManagement/priceConfirmationSheetEdit.vue

@@ -61,7 +61,7 @@
           </ws-form-item>
 
           <!--点价单附件-->
-          <ws-form-item label="点价单附件" span="1" prop="priceListNo">
+          <ws-form-item label="点价单附件" span="1" prop="addressUrl">
             <el-upload
               class="upload-demo"
               action="https://www.zthymaoyi.com/upload/admin"
@@ -77,8 +77,8 @@
             </el-upload>
             <div class="shangchuan">
               <template>
-                <span v-if="deptBudgetList.enclosureTypeFlag == '0'">未上传</span>
-                <span v-if="deptBudgetList.enclosureTypeFlag == '1'">已上传</span>
+                <span v-if="deptBudgetList.enclosureTypeFlag == 0">未上传</span>
+                <span v-if="deptBudgetList.enclosureTypeFlag == 1">已上传</span>
               </template>
             </div>
           </ws-form-item>
@@ -252,8 +252,10 @@ export default {
          contractNo: this.$route.query.contractNo,
          contractType :this.$route.query.contractType,
          id: this.$route.query.id,
-     
+         
+           addressUrl: '',
       },
+
       addressUrls: [],
       deptBudgetList: {},
     }
@@ -286,7 +288,8 @@ export default {
     // 上传附件
     uploadSuccessHandle(e) {
       this.addressUrls.push(e.url)
-      this.deptBudgetList.addressUrl = this.addressUrls.toString
+       this.enclosureTypeFlag = 1
+      
     },
     onChange(files) {
       this.fileNum = files
@@ -502,7 +505,7 @@ export default {
       }
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
-      // this.deptBudgetList.enclosureTypeFlag = '0'
+      this.deptBudgetList.addressUrl = this.addressUrls.toString(),
       this.priceConfirmationSheet = this.deptBudgetList
       this.$confirm(`确定提交确认单信息`, {
         cancelButtonText: '取消',

+ 409 - 189
src/views/financialManagement/collectionManagementList.vue

@@ -2,33 +2,54 @@
 <template>
   <div class="container">
     <!-- <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">
+        <span style="width: 70px; display: inline-block; color: #8890b1"
+          >状态:</span
+        >
+        <ws-select
+          v-model="searchTypeText"
+          placeholder
+          class="typeselect"
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+      </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  @click="handleAdd()">全部</ws-button>
-    <ws-button  @click="handleAdd()">待回款</ws-button>
-    <ws-button  @click="handleAdd()">已汇款</ws-button>
+            src="../../../public/img/sousuo.png"
+            alt
+          />
+        </ws-button>
+      </template>
+    </BaseHeaderLayout>
+
     <el-table
       class="wenzi"
       :data="warehouseList.records"
@@ -43,15 +64,58 @@
       <el-table-column class="table_td" prop="basisPrice" label="应收(元)"></el-table-column>
       <el-table-column class="table_td" prop="unitPrice" 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 prop="seller" label="操作" >
+      <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 prop="seller" label="操作">
         <template slot-scope="scope">
           <div class="record" @click="dialogFormVisible2=true">派发</div>
-            <el-dialog
-            width="40%"
+          <el-dialog
+            width="60%"
             title="派发(123)"
             :visible.sync="dialogFormVisible2"
             :append-to-body="true"
@@ -65,7 +129,70 @@
                   class="deal"
                 ></el-select>
               </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-dialog>
         </template>
@@ -79,13 +206,15 @@
       :page-size="deptCircularPage.pageSize"
       layout="total, sizes, prev, pager, next, jumper"
       :total="deptBudgetTotal"
-    >
-    </el-pagination>
+    ></el-pagination>
   </div>
   <!-- </div> -->
 </template>
 <script>
-import { procurementPlan , procurementDel } from '@/model/purchasingManagement/index'
+import {
+  procurementPlan,
+  procurementDel
+} from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -113,8 +242,8 @@ export default {
       monetaryKey: null,
       // 表格显示数据
       tableDate: [],
-        dialogFormVisible2 :false,
-        form: {
+      dialogFormVisible2: false,
+      form: {
         transactionPrice: '',
         transactionsNumber: '',
         basis: '',
@@ -131,16 +260,20 @@ export default {
       year: '',
       pickerOptions: {},
       value2: '',
-      handleSizeChange:'',
+      handleSizeChange: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       // tranTypeKey: 1,
       pageSize: 10,
       searchType: 1,
-      searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
-      pcFlag:1,
+      taskTypeList:[
+        { value: '待回款' ,type: 1},
+        { value: '已汇款' ,type: 2},
+        { value: '全部' , type: ''},
+      ],
+      pcFlag: 1,
       // 提交类型
       submitType: true,
       size: 10,
@@ -151,7 +284,7 @@ export default {
       deptCircularPage: {},
       warehouseList: [],
       deptBudgetList: {},
-      pcFlag:1,
+      pcFlag: 1,
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: time => {
@@ -175,7 +308,7 @@ export default {
         contractType: this.contractType,
         tranTypeKey: this.tranTypeKey,
         contractNo: this.contractNo,
-        pcFlag: this.pcFlag,
+        pcFlag: this.pcFlag
       })
         .toPromise()
         .then(response => {
@@ -186,12 +319,18 @@ export default {
       this.searchType = state
       this.getList()
     },
-    
+    add() {
+      this.freightspace.push({
+        // binNumber: '',
+        // maxStorage: '',
+        // remark: '',
+      })
+    },
     //编辑
     handleEdit(row) {
       this.$router.push({
         name: 'procurementPlanEdit',
-        query: {  id: row.id },
+        query: { id: row.id }
       })
     },
     getSpanArr(data) {
@@ -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(){
     //   this.$router.push({
@@ -241,97 +410,21 @@ export default {
     //   })
     // },
     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' })
-    },
-    dateFormat(fmt, date) {
-      let ret
-      const opt = {
-        'Y+': date.getFullYear().toString(), // 年
-        'm+': (date.getMonth() + 1).toString(), // 月
-        'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString() // 时
-        // "M+": date.getMinutes().toString(),         // 分
-        // "S+": date.getSeconds().toString()          // 秒
-        // 有其他格式化字符需求可以继续添加,必须转化成字符串
-      }
-      for (let k in opt) {
-        ret = new RegExp('(' + k + ')').exec(fmt)
-        if (ret) {
-          fmt = fmt.replace(
-            ret[1],
-            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
-          )
-        }
-      }
-      return fmt
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    editClick(row) {
-      var status = ''
-      if (row.status == '待审核' || row.status == '已完成') {
-        status = '执行中'
-      } else if (row.status == '执行中') {
-        status = '已完成'
+      var handleDelete = ' '
+      if (row.handleDelete == '') {
       }
-      //cancelButtonClass: "btn-custom-cancel"
-      this.$confirm(`是否将状态改为${status}`, {
-        confirmButtonText: '确定',
+      this.$confirm(`采购计划删除后不可恢复,是否确定删除?`, {
         cancelButtonText: '取消',
+        confirmButtonText: '确定',
         type: 'warning'
       })
         .then(() => {
-          alsostate({ id: row.id })
+          procurementDel({ id: row.id })
             .toPromise()
             .then(response => {
               this.$notify.success({
                 title: '成功',
-                message: '状态修改成功'
+                message: '删除成功'
               })
               this.getList()
             })
@@ -342,75 +435,147 @@ export default {
         .catch(() => {
           return false
         })
-    },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
-        }
+    }
+  },
+
+  //返回
+  revert() {
+    this.$router.push({ path: 'warehouseManagementList' })
+  },
+  dateFormat(fmt, date) {
+    let ret
+    const opt = {
+      'Y+': date.getFullYear().toString(), // 年
+      'm+': (date.getMonth() + 1).toString(), // 月
+      'd+': date.getDate().toString(), // 日
+      'H+': date.getHours().toString() // 时
+      // "M+": date.getMinutes().toString(),         // 分
+      // "S+": date.getSeconds().toString()          // 秒
+      // 有其他格式化字符需求可以继续添加,必须转化成字符串
+    }
+    for (let k in opt) {
+      ret = new RegExp('(' + k + ')').exec(fmt)
+      if (ret) {
+        fmt = fmt.replace(
+          ret[1],
+          ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+        )
       }
-    },
-    // 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) {
-      this.$router.push({
-        name: 'salesContractExamine',
-        query: { id: row.id }
+    }
+    return fmt
+  },
+  handleClose() {
+    this.accessoryTFs = false
+  },
+  handleSizeChange(val) {
+    console.log(`每页 ${val} 条`)
+    this.pageSize = val
+    this.getList()
+  },
+  handleCurrentChange(val) {
+    this.currentPage = val
+    console.log(`当前页: ${val}`)
+    this.getList()
+  },
+  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'))
+          })
       })
-    },
-    // 关闭 dialog时 处理文件url 初始化upload组件
-    handleCloe() {
-      this.dialogViewSpareMoney = false
-    },
-    history(row) {
-      billoperatehis({ id: row.id })
-        .toPromise()
-        .then(response => {
-          this.historyList = response
-        })
-    },
-    //查找
-    find() {
-      this.currentPage = 1
-      this.getList()
-    },
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${this.date.year +
-          (this.date.month ? `-${this.date.month}` : '')}_采购合同`,
-        type: 'xls'
+      .catch(() => {
+        return false
       })
-    },
-    total() {}
-  }
+  },
+  selecttaskType(e) {
+    for (var i = 0; i < this.taskTypeList.length; i++) {
+      if (this.taskTypeList[i].value == e) {
+        this.searchType = this.taskTypeList[i].type
+      }
+    }
+  },
+  // 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) {
+    this.$router.push({
+      name: 'salesContractExamine',
+      query: { id: row.id }
+    })
+  },
+  // 关闭 dialog时 处理文件url 初始化upload组件
+  handleCloe() {
+    this.dialogViewSpareMoney = false
+  },
+  history(row) {
+    billoperatehis({ id: row.id })
+      .toPromise()
+      .then(response => {
+        this.historyList = response
+      })
+  },
 
+  //查找
+  find() {
+    this.currentPage = 1
+    this.getList()
+  },
+  async exportlist() {
+    const { data } = await export1(
+      {
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate
+      },
+      {},
+      { responseType: 'blob' }
+    ).toPromise()
+    downloadFile({
+      res: data,
+      fileName: `${this.date.year +
+        (this.date.month ? `-${this.date.month}` : '')}_采购合同`,
+      type: 'xls'
+    })
+  },
+  total() {}
+}
 </script>
 <style lang="scss" scoped>
 .connert {
@@ -622,4 +787,59 @@ export default {
 .el-table .el-table__body .cell {
   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;
+}
+ .base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+    margin-top: -1px;
+}
+/deep/.typeselect .el-input__inner {
+  color: #8890b1;
+}
+.el-select {
+    width: 30%;
+    margin-right: 10px;
+}
 </style>

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

@@ -81,10 +81,10 @@
             v-show="dataList.procurementPlanType=='现货'"
             label="采购价格(元)"
             span="1"
-            prop="unitPrice"
+            prop="procurementPrice"
           >
             <el-input
-              v-model="dataList.unitPrice"
+              v-model="dataList.procurementPrice"
               maxlength="120"
               size="small"
               placeholder="请输入采购价格"
@@ -259,13 +259,9 @@
 <script>
 import { procurementAdd } from '@/model/purchasingManagement/index'
 import { regionData,provinceAndCityDataPlus, CodeToText, TextToCode } from 'element-china-area-data'
-import { pullDown } from '@/model/warehouse/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 { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
@@ -607,13 +603,6 @@ export default {
       return arr.join('')
     },
     submit() {
-      // if(!this.dataList.goodName) {
-      //   this.$message({
-      //     message:'货名不能为空',
-      //     type:'warning'
-      //   })
-      //   return
-      // }
       if (!this.dataList.title) {
         this.$message({
           message: '标题不能为空!',
@@ -673,20 +662,6 @@ export default {
         })
         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) {
         this.$message({
           message: '买方不能为空!',
@@ -816,9 +791,9 @@ export default {
               this.dataList.procurementPlanNo='CGJH'+this.getdate()+this.verifyinit()
               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.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]]

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

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

+ 55 - 39
src/views/purchasingManagement/procurementPlanList.vue

@@ -1,34 +1,12 @@
 //采购计划
 <template>
   <div class="container">
-    <!-- <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="
-            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>
+
+    <BaseHeaderLayout :leftSpan="10">
+      <template slot="left">
+        <ws-button type="primary" @click="handleAdd()">添加</ws-button>
+      </template>
+
       <!-- 接单开始 -->
       <template slot="right">
         <ws-input
@@ -87,18 +65,27 @@
             <div class="inputChenge">
               <el-input
                 v-model="scope.row.basisPrice"
-                @change="varietyClick(scope.row)"
-                class="inputs"
+                v-if="scope.row.identification == 'true'"
               ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.basisPrice }}
+              </div>
             </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="varietyClick(scope.row)"
+              @click="whether(scope.row)"
               alt=""
+              v-if="scope.row.identification == 'false'"
             />
+            <i
+              class="el-icon-check"
+              style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'"
+              @click="varietyClick(scope.row)"
+            ></i>
           </div>
           <div v-else>—</div>
         </template>
@@ -110,18 +97,27 @@
               <!-- readonly -->
               <el-input
                 v-model="scope.row.unitPrice"
-                v-bind:class="inputs"
-                @change="varietyClick(scope.row)"
+                v-if="scope.row.identification == 'true'"
               ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.unitPrice }}
+              </div>
             </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="varietyClick(scope.row)"
+              @click="whether(scope.row)"
+              v-if="scope.row.identification == 'false'"
               alt=""
             />
+            <i
+              class="el-icon-check"
+              style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'"
+              @click="varietyClick(scope.row)"
+            ></i>
           </div>
           <div v-else>—</div>
         </template>
@@ -279,7 +275,6 @@ export default {
         },
       },
       accessoryTFs: false,
-      inputs: 'inputs1',
     }
   },
   activated() {
@@ -296,11 +291,17 @@ export default {
         tranTypeKey: this.tranTypeKey,
         contractNo: this.contractNo,
         pcFlag: this.pcFlag,
-        searchKeyWord:this.searchKeyWord
+        searchKeyWord: this.searchKeyWord,
       })
         .toPromise()
         .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+          }
           this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
     },
     statusquery(state) {
@@ -314,6 +315,10 @@ export default {
         query: { id: row.id },
       })
     },
+    whether(row) {
+      row.identification = 'true'
+    },
+
     getSpanArr(data) {
       let that = this
 
@@ -497,6 +502,7 @@ export default {
         }
       }
     },
+    handleSizeChange() {},
     // fujian(row) {
     //   if (
     //     row.receiveAttachmentPath === null ||
@@ -557,6 +563,7 @@ export default {
       })
     },
     varietyClick(row) {
+      console.log('jin')
       if (row.procurementPlanType == '期货') {
         this.$confirm(`确定要修改基差?`, {
           confirmButtonText: '确定',
@@ -825,10 +832,19 @@ export default {
   width: 50%;
   display: inline-flex;
 }
-.inputs1 {
-  border: none;
+.inputs {
+  margin: 0 auto;
+}
+
+.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+    margin-top: -1px;
+    margin-left: -6px;
 }
 // .inputChenge>>>.el-input__inner{
 // border: none;
-// }
+
 </style>

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

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

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

@@ -892,13 +892,6 @@ dialogImageUrl:"",
       })
       .then(() => {
         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)
         .toPromise()
         .then((response) => {
@@ -943,6 +936,9 @@ dialogImageUrl:"",
             response.records[i].basischange=false
           }
           this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
         //包装方式
       packList({ constId: 'PRO2' })
@@ -963,15 +959,6 @@ dialogImageUrl:"",
           this.contractNolist = response
         })
     },
-    // loaddata(){
-    //   chengList({
-    //      compId: sessionStorage.getItem('ws-pf_compId'),
-    //   })
-    //   .toPromise()
-    //   .then(response => {
-    //       this.warehouseList = response
-    //     })
-    // },
     handleRemove(file) {
       console.log(file)
     },
@@ -982,23 +969,6 @@ dialogImageUrl:"",
     handleDownload(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) {
       let that = this
 

ファイルの差分が大きいため隠しています
+ 686 - 188
src/views/salesManagement/salesPlanAdd.vue


+ 531 - 177
src/views/salesManagement/salesPlanEdit.vue

@@ -25,104 +25,158 @@
         </div>
         <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
-            />
-          </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
-              v-model="dataList.bulkDensity"
+              v-model="dataList.salePrice"
               maxlength="120"
               size="small"
               placeholder="请输入销售价格"
             />
-          </el-form-item>
+          </ws-form-item>
           <!--出货库-->
-          <el-form-item label="出货库" span="1">
+          <ws-form-item label="出货库" span="1" prop="sendWarehouse">
             <el-select
-              v-model="dataList.waterContent"
+              disabled
+              v-model="dataList.sendWarehouse"
               maxlength="120"
               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="请选择出货库所在地区"
+              @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
-              v-model="dataList.businessDescribe"
+              v-model="dataList.baggingNotes"
               size="small"
               placeholder="请输入装袋要求如:98斤,王中王彩袋"
             />
           </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
-              v-model="dataList.agent"
+              v-model="dataList.sellerPhone"
               filterable
               :filter-method="dataFilter"
               placeholder="请输入卖方电话"
@@ -136,64 +190,89 @@
           <h3>货物要求</h3>
         </div>
         <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 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 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 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 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 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 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 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="请选择产地"
+              @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>
       </div>
@@ -206,15 +285,12 @@
 </template>
 <script>
 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 { packList } from '@/model/contarct/index'
 import { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -249,6 +325,8 @@ export default {
       showType: true,
       // 年
       year: '',
+      options1_: provinceAndCityDataPlus,
+      options_: regionData,
       contractNoList: [],
       deptBudgetTotal: 0,
       readonly: true,
@@ -303,9 +381,18 @@ export default {
       contractList: [],
       inOutTaskNo: '',
       inOutTaskNo1: '',
+      freightPayerList: '',
+      packingTypeList: '',
       dataList: { taskTypeKey: '1' },
       dataList1: { taskTypeKey: '1' },
       historyList: [],
+      salePlanTypeList:[],
+      selectedOptions:[],
+      selectedOptions1: [],
+      grainList: [],
+      warehouseNameList: [],
+      warehouseNameList1: [],
+      warehouseList1: [],
       pickerBeginDateBefore: {
         disabledDate: time => {
           return time.getTime() > Date.now()
@@ -314,15 +401,19 @@ export default {
       accessoryTFs: false
     }
   },
-  mounted() {
-    this.getList()
+  activated() {
+    this.loaddata()
+    this.showType = this.isShow
   },
+  mounted() {},
   methods: {
     //返回按钮
     revert() {
       this.$router.go(-1)
     },
     returnsales() {
+      this.dataList = {}
+      // this.selectedOptions = ''
       this.$router.push({ path: 'salesPlanList' })
     },
     // 获取当前年月日
@@ -372,6 +463,14 @@ export default {
         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) {
       for (var i = 0; i < this.staffList.length; i++) {
         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() {
       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() {},
     tarechange(e) {
       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) {
       for (var i = 0; i < this.packtypeList.length; i++) {
         if (this.packtypeList[i].constValue == e) {
@@ -497,24 +865,6 @@ export default {
       var Rand = Math.random()
       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(){},
     //删除
     approve() {},
@@ -553,6 +903,7 @@ export default {
       align-items: center;
       text-align: left;
       overflow: hidden;
+      
     }
   }
 }
@@ -753,4 +1104,7 @@ export default {
   top: 21%;
   font-size: 20px;
 }
+/deep/.typeselect .el-input__inner {
+  color: #8890b1;
+}
 </style>

+ 22 - 64
src/views/salesManagement/salesPlanList.vue

@@ -1,33 +1,7 @@
 //销售计划
 <template>
   <div class="container">
-    <!-- <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="
-            vertical-align: text-top;
-            position: relative;
-            top: 0px;
-            left: -8px;
-          "
-          src="../../../public/img/sousuo.png"
-          alt
-        />
-      </ws-button>
-    </div> -->
-  
-     <BaseHeaderLayout :leftSpan="10">
+    <BaseHeaderLayout :leftSpan="10">
       <template slot="left">  <ws-button type="primary" @click="handleAdd()">添加</ws-button> </template>
       <!-- 接单开始 -->
       <template slot="right">
@@ -63,7 +37,7 @@
       <el-table-column type="index" label="序号" width="80"></el-table-column>
       <el-table-column
         class="table_td"
-        prop="procurementPlanNo"
+        prop="salePlanNo"
         label="销售计划编号"
       ></el-table-column>
       <el-table-column
@@ -78,12 +52,12 @@
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="plannedPurchaseVolume"
+        prop="plannedSaleVolume"
         label="重量(吨)"
       ></el-table-column>
       <el-table-column class="table_td" prop="basisPrice" label="基差(元/吨)">
         <template slot-scope="scope">
-          <div v-if="scope.row.procurementPlanType == '期货'">
+          <div v-if="scope.row.salePlanType == '期货'">
             <div class="inputChenge">
               <el-input
                 v-model="scope.row.basisPrice"
@@ -105,7 +79,7 @@
       </el-table-column>
       <el-table-column class="table_td" prop="unitPrice" label="单价(元/吨)">
         <template slot-scope="scope">
-          <div v-if="scope.row.procurementPlanType == '现货'">
+          <div v-if="scope.row.salePlanType == '现货'">
             <div class="inputChenge">
               <!-- readonly -->
               <el-input
@@ -128,7 +102,7 @@
       </el-table-column>
       <el-table-column
         class="table_td"
-        prop="receiveWarehouse"
+        prop="sendWarehouse"
         label="出货库"
       ></el-table-column>
       <el-table-column prop="status" label="状态">
@@ -213,10 +187,10 @@
 </template>
 <script>
 import {
-  procurementPlan,
-  procurementDel,
-  procurementEditOther,
-} from '@/model/purchasingManagement/index'
+  salePlan,
+  saleDel,
+  saleEditOther,
+} from '@/model/salesManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -254,12 +228,11 @@ export default {
       handleSizeChange: '',
       deptBudgetTotal: 0,
       currentPage: 1,
-      // tranTypeKey: 1,
       pageSize: 10,
       searchType: 1,
       searchTypeText: '未完成',
       searchKeyWord: '',
-      contractType: 2,
+      contractType: 1,
       pcFlag: 1,
       // 提交类型
       submitType: true,
@@ -288,7 +261,7 @@ export default {
   },
   methods: {
     getList() {
-      procurementPlan({
+      salePlan({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
@@ -301,6 +274,9 @@ export default {
         .toPromise()
         .then((response) => {
           this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
         })
     },
     statusquery(state) {
@@ -370,7 +346,7 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          procurementDel({ id: row.id })
+          saleDel({ id: row.id })
             .toPromise()
             .then((response) => {
               this.$notify.success({
@@ -438,7 +414,7 @@ export default {
           type: 'warning',
         })
           .then(() => {
-            procurementEditOther({
+            saleEditOther({
               flag: 0,
               showFlag: num,
               id: row.id,
@@ -467,7 +443,7 @@ export default {
           type: 'warning',
         })
           .then(() => {
-            procurementEditOther({
+            saleEditOther({
               flag: 0,
               showFlag: num,
               id: row.id,
@@ -481,14 +457,12 @@ export default {
                 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++) {
@@ -497,20 +471,6 @@ 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) {
       this.$router.push({
         name: 'salesContractExamine',
@@ -530,7 +490,6 @@ export default {
     },
     //查找
     find() {
-      // this.searchKeyWord = 1
       this.getList()
     },
     async exportlist() {
@@ -557,14 +516,14 @@ export default {
       })
     },
     varietyClick(row) {
-      if (row.procurementPlanType == '期货') {
+      if (row.salePlanType == '期货') {
         this.$confirm(`确定要修改基差?`, {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
         })
           .then(() => {
-            procurementEditOther({
+            saleEditOther({
               flag: 1,
               basisPrice: row.basisPrice,
               id: row.id,
@@ -578,20 +537,19 @@ export default {
                 this.getList()
               })
               .catch((response) => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
               })
           })
           .catch(() => {
             return false
           })
-      } else if (row.procurementPlanType == '现货') {
+      } else if (row.salePlanType == '现货') {
         this.$confirm(`确定要修改单价?`, {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
         })
           .then(() => {
-            procurementEditOther({
+            saleEditOther({
               flag: 2,
               unitPrice: row.unitPrice,
               id: row.id,

+ 47 - 70
src/views/salesManagement/salesPlanLook.vue

@@ -26,59 +26,67 @@
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
           <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 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 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 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 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 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>
+          <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-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 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 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 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 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 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 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>
           <div class="small-title"></div>
         </el-form>
@@ -89,48 +97,48 @@
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <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 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 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 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 label="霉变粒(%)<=">
-            <el-input disabled v-model="dataList.goodsName" />
+            <el-input disabled v-model="dataList.mildewGrain" />
           </el-form-item>
           <!--不完善粒(%)<=-->
           <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 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 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 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 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 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>
       </div>
@@ -143,11 +151,8 @@
 </template>
 <script>
 import {
-  getwarehousename,
-  xialaNo,
-  addoreditoutput,
-  outexamine
-} from '@/model/tasksport/index'
+  saleLook,
+} from '@/model/salesManagement/index'
 import { packList } from '@/model/contarct/index'
 import { pullDown, getstaff } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
@@ -344,28 +349,8 @@ export default {
     },
     //关闭
     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() {},
     tarechange(e) {
       if (this.dataList.grossWeight && this.dataList.tare) {
@@ -434,21 +419,13 @@ export default {
       var Rand = Math.random()
       return Min + Math.round(Rand * Range)
     },
-    getList() {
-      outexamine({ relevanceId: this.$route.query.relevanceId })
-        .toPromise()
+    getList(){
+      saleLook({
+        id: this.$route.query.id
+      })
+      .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]
-            }
-          }
+          this.dataList = response
         })
     },
 

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

@@ -1063,17 +1063,11 @@ export default {
         .toPromise()
         .then(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) {
       console.log(file)
     },

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

@@ -143,7 +143,10 @@
           class="wenzi"
           :data="warehouseList.records"
           style="width: 100%; margin-top: 20px"
-          height="780"
+          ref="warehouseList"
+          border
+          :summary-method="getSummaries"
+          show-summary
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="55"></el-table-column>
@@ -283,6 +286,38 @@ export default {
     this.showType = this.isShow
   },
   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() {
       if (!this.warehouseList.transactionPrice) {
@@ -785,6 +820,12 @@ hr {
 .el-input-number--small {
   width: 123% !important;
 }
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
 // .danjia{
 //   width: 9px;
 //   height: 9px;

+ 43 - 2
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -158,7 +158,7 @@
           <ws-button type="primary" @click="handleAdd()">审核</ws-button>
           <ws-select
             v-model="searchKeyWord"
-            placeholder="可按照合同编号和任务编号进行查找"
+            placeholder="全部合同"
             clearable
             maxlength="500"
             type="input"
@@ -174,7 +174,10 @@
           class="wenzi"
           :data="warehouseList.records"
           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="index" label="序号" width="50"></el-table-column>
@@ -337,6 +340,38 @@ export default {
     this.showType = this.isShow
   },
   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() {
       if (!this.warehouseList.transactionPrice) {
@@ -836,6 +871,12 @@ hr {
 .el-input-number--small {
   width: 123% !important;
 }
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
 // .danjia{
 //   width: 9px;
 //   height: 9px;

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

@@ -159,8 +159,11 @@
           class="wenzi"
           :data="warehouseList.records"
           style="width: 100%; margin-top: 20px"
-          height="780"
           @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="index" label="序号" width="50"></el-table-column>
@@ -307,6 +310,38 @@ export default {
     this.showType = this.isShow
   },
   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() {
       if (!this.warehouseList.transactionPrice) {
@@ -811,6 +846,12 @@ hr {
 .el-input-number--small {
   width: 123% !important;
 }
+/deep/.el-table td,
+.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+  height: 40px;
+}
 // .danjia{
 //   width: 9px;
 //   height: 9px;

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

@@ -113,7 +113,9 @@
             :append-to-body="true"
           >
             <el-form :model="form">
-               <div style=" margin-left: 30%;"><h4>合计发票金额{{}}元,确定提交?</h4></div>
+              <div style=" margin-left: 30%;">
+                <h4>合计发票金额{{}}元,确定提交?</h4>
+              </div>
             </el-form>
             <div slot="footer" class="dialog-footer">
               <el-button @click="dialogFormVisible3 = false">取 消</el-button>
@@ -139,7 +141,7 @@
               <el-button @click="dialogFormVisible3 = false">取 消</el-button>
               <el-button type="primary" @click="dialogFormVisible3 = false">提 交</el-button>
             </div>
-           </el-dialog> -->
+          </el-dialog>-->
           <ws-button type="primary" @click="dialogFormVisible4=true">付款</ws-button>
 
           <el-dialog
@@ -258,10 +260,11 @@
         <el-table
           class="wenzi"
           :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
-         
         >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -410,38 +413,45 @@ export default {
       accessoryTFs: false
     }
   },
+
   activated() {
     // this.loaddata()
     this.getList()
     this.showType = this.isShow
   },
   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() {
       if (!this.warehouseList.transactionPrice) {
@@ -727,7 +737,6 @@ export default {
 .el-button--primary {
   background-color: #5878e8;
   border-color: #5878e8;
- 
 }
 .el-button--default {
   color: #8890b1;
@@ -944,6 +953,19 @@ hr {
 .el-input-number--small {
   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{
 //   width: 9px;
 //   height: 9px;

+ 1 - 0
vue.config.js

@@ -143,6 +143,7 @@ module.exports = {
         // target: 'http://localhost:8090/',
         target: 'http://192.168.1.120:8090/',
         // target: 'http://192.168.1.112:8090/',
+        // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません