Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 3 years ago
parent
commit
2f4068aea7

+ 2 - 0
src/api/V2/contract/index.js

@@ -25,6 +25,8 @@ export const API_POST_CONTRACT_DELETE = '/contractManagementInfo/deleteInfo '
 export const API_POST_EDITINFO = '/contractManagementInfo/editInfo'
 // 获取负责人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
+// 获取现货采购负责人
+export const API_GET_STAFF_FIND = '/staff/query/findRole'
 //运输任务-添加-根据仓库类型选库名
 export const API_GET_TRAN_TASK_WAREHOUSE = '/tranTaskInfo/selectWarehouseList'
 

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -67,6 +67,8 @@ export const API_POST_ADD_INVENTORYCOSTINFO = '/inventoryCostInfo/api/addInvento
 export const API_POST_EDIT_INVENTORYCOSTINFO = '/inventoryCostInfo/api/editInventoryCostInfo'
 // 加权明细
 export const API_GET_WEIGHTEDDETAILS = '/weightedDetails/selectInventoryCostInfo'
+// 库
+export const API_GET_WAREHOUSE = '/warehouseBaseInfo/selectWarehouse'
 
 
 

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

@@ -21,7 +21,8 @@ import {
     API_POST_CONFIRMATIONSHEET_ADD,
     API_GET_GETINFO,
     API_POST_CONFIRMATIONSHEET_DELETE,
-    API_GET_STAFF
+    API_GET_STAFF,
+    API_GET_STAFF_FIND
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -48,6 +49,8 @@ export const deletecontract = appRx.post(API_POST_CONTRACT_DELETE, errorCatcher,
 export const editInfo = appRx.post(API_POST_EDITINFO, errorCatcher, errorHandle, filter)
 //获取负责人
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
+//获取现货采购负责人
+export const getstafffind = appRx.get(API_GET_STAFF_FIND, errorCatcher, errorHandle, filter)
 //运输任务-添加-根据仓库类型选库名
 export const getwarehousename = appRx.get(API_GET_TRAN_TASK_WAREHOUSE, errorCatcher, errorHandle, filter)
 

+ 4 - 1
src/model/warehouse/index.js

@@ -32,7 +32,8 @@ import {
     API_GET_INVENTORYCOSTINFO,
     API_POST_ADD_INVENTORYCOSTINFO,
     API_POST_EDIT_INVENTORYCOSTINFO,
-    API_GET_WEIGHTEDDETAILS
+    API_GET_WEIGHTEDDETAILS,
+    API_GET_WAREHOUSE
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // 列表
@@ -100,6 +101,8 @@ export const addinventory = appRx.post(API_POST_ADD_INVENTORYCOSTINFO,errorCatch
 export const editinventory = appRx.post(API_POST_EDIT_INVENTORYCOSTINFO,errorCatcher, errorHandle, filter)
 // 编辑库点费用
 export const weighteddetails = appRx.get(API_GET_WEIGHTEDDETAILS,errorCatcher, errorHandle, filter)
+// 编辑库点费用
+export const getwarehousebase = appRx.get(API_GET_WAREHOUSE,errorCatcher, errorHandle, filter)
 
 
 

+ 4 - 4
src/views/contractManagement/futuresPurchaseContractAdd.vue

@@ -1380,7 +1380,7 @@ export default {
       ) 
       {
         this.$message({
-          message: '合同收入金额输入错误',
+          message: '已付款金额输入错误',
           type: 'warning',
         })
         return
@@ -1399,7 +1399,7 @@ export default {
             2)
       ) {
         this.$message({
-          message: '费用金额输入错误',
+          message: '费用支出金额输入错误',
           type: 'warning',
         })
         return
@@ -1474,8 +1474,8 @@ export default {
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 2
           this.deptBudgetList.goodsType = 2
-           if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
-            this.deptBudgetList.deliveryArea = "特别行政区"
+           if(this.deptBudgetList.deliveryProvince =='澳门特别行政区' || this.deptBudgetList.deliveryProvince == '澳门特别行政区'){
+            this.deptBudgetList.deliveryArea = '特别行政区'
           }else{ 
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
           }

+ 21 - 21
src/views/contractManagement/purchaseContractAdd.vue

@@ -548,7 +548,7 @@ import {
   addxiala,
   editxiala,
   delxiala,
-  getstaff,
+  getstafffind,
 } from '@/model/contarct/index'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
 import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -644,7 +644,7 @@ export default {
     this.deptBudgetList.contractProcessInfo.gradeKey = 1
     this.deptBudgetList.contractGoodsInfo.grade = '一等品'
     this.deptBudgetList.contractGoodsInfo.gradeKey = 1
-    getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+    getstafffind({ roles: 'd6a5c8a52da544309259f91f75de1ec6' })
       .toPromise()
       .then((response) => {
         this.options = response
@@ -1203,25 +1203,25 @@ export default {
         })
         return
       }
-      if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
-          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
-        (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
-            (String(
-              this.deptBudgetList.contractProcessInfo.goodsNameKey
-            ).indexOf('.') +
-              1) >
-            2)
-      ) {
-        this.$message({
-          message: '合同收入金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
+      // if (
+      //   (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
+      //     (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
+      //   (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+      //     '.'
+      //   ) != -1 &&
+      //     String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+      //       (String(
+      //         this.deptBudgetList.contractProcessInfo.goodsNameKey
+      //       ).indexOf('.') +
+      //         1) >
+      //       2)
+      // ) {
+      //   this.$message({
+      //     message: '合同收入金额输入错误',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
       if (
         (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
           (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||

+ 4 - 4
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -95,13 +95,13 @@
                       v-show="item1.type!=1&&item1.type!=2&&item1.type!=3" :disabled="!isEdit">-</el-button>
                   </div>
                   <div v-show="item1.type!=4">
-                    <input v-if='item1.type==1' class="water-price" :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterMin"
+                    <input v-if='item1.type==1' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterMin"
                       :disabled="item1.isWrite?false:true"></input>
-                    <input v-if='item1.type==2' class="water-price" :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterBase"
+                    <input v-if='item1.type==2' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterBase"
                       :disabled="item1.isWrite?false:true"></input>
-                    <input v-if='item1.type==3' class="water-price" :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterMax"
+                    <input v-if='item1.type==3' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterMax"
                       :disabled="item1.isWrite?false:true"></input>
-                    <input v-if='item1.type==5' class="water-price" :class="item1.isWrite?'white-bgc':''" v-model="item1.water"
+                    <input v-if='item1.type==5' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="item1.water"
                       :disabled="isEdit?false:true"></input>
                   </div>
                   <div class="circle" v-if="item1.type!=4"></div>

+ 1 - 1
src/views/outboundManagement/component/route.js

@@ -8,7 +8,7 @@ const outboundManagementRouter = {
     alwaysShow: true, // will always show the root menu
     meta: {
         title: 'outboundManagement',
-        module: 'contractManagement',
+        module: 'outbound',
         icon: '-hetongguanli'
     },
     children: [

+ 36 - 35
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -203,7 +203,7 @@
           label="净重"
         ></el-table-column>
         <el-table-column
-          width="300"
+          width="120"
           class="table_td"
           prop="settlementWeight"
           label="结算重量(吨)"
@@ -411,6 +411,7 @@ import {
   stockPurchasePayMoney,
 } from '@/model/statisticalReport/index'
 import { downloadFile } from '@/utils/batchDown'
+import { posthandle } from '@/model/purchasingManagement/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import { EventBus } from 'base-core-lib'
@@ -539,7 +540,6 @@ export default {
   },
   activated() {
     this.getContractList()
-    this.getList()
     this.showType = this.isShow
   },
   methods: {
@@ -811,37 +811,37 @@ export default {
         })
       }
     },
-    // audit(item, index, status, status2, reason) {
-    //   if (index < this.modification.length) {
-    //     posthandle({
-    //       taskId: item.taskId,
-    //       approved: status,
-    //       auditMind: reason != undefined ? '已驳回' : '34',
-    //       needReapply: status2 != undefined ? true : false,
-    //     })
-    //       .toPromise()
-    //       .then((response) => {
-    //         this.audit(
-    //           this.modification[index + 1],
-    //           index + 1,
-    //           status,
-    //           status2,
-    //           reason
-    //         )
-    //       })
-    //       .catch((req) => {
-    //         this.$message.warning(req.message)
-    //       })
-    //   } else {
-    //     if (status == true) {
-    //       this.$message.success('通过成功')
-    //       this.getList()
-    //     } else if (status == false) {
-    //       this.$message.success('驳回成功')
-    //       this.getList()
-    //     }
-    //   }
-    // },
+    audit(item, index, status, status2, reason) {
+      if (index < this.modification.length) {
+        posthandle({
+          taskId: item.taskId,
+          approved: status,
+          auditMind: reason != undefined ? '已驳回' : '34',
+          needReapply: status2 != undefined ? true : false,
+        })
+          .toPromise()
+          .then((response) => {
+            this.audit(
+              this.modification[index + 1],
+              index + 1,
+              status,
+              status2,
+              reason
+            )
+          })
+          .catch((req) => {
+            this.$message.warning(req.message)
+          })
+      } else {
+        if (status == true) {
+          this.$message.success('通过成功')
+          this.getList()
+        } else if (status == false) {
+          this.$message.success('驳回成功')
+          this.getList()
+        }
+      }
+    },
     handlereject(status) {
       var that = this
       if (this.modification.length == 0) {
@@ -984,6 +984,7 @@ export default {
           this.contractNoList = response
           this.option = this.contractNoList
        this.contractNo = this.option[0].contractNo
+       this.getList()
         })
     },
     handleRemove(file) {
@@ -1311,7 +1312,7 @@ export default {
 .el-input--small {
   font-size: 13px;
   width: 390px;
-  margin-left: 74%;
+  margin-left: 38%;
 }
 /deep/.el-table .el-table__header .cell,
 .el-table .el-table__body .cell {
@@ -1358,7 +1359,7 @@ hr {
 .inputChenge {
   width: 100%;
   display: inline-flex;
-  margin-left: -69%;
+  margin-left: -28%;
 }
 .inputs {
   margin: 0 auto;

+ 1 - 1
src/views/taskManagement/moveWarehouseTask.vue

@@ -217,7 +217,7 @@ export default {
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
-      searchTypeText: '待审核',
+      searchTypeText: '执行中',
       searchKeyWord: '',
       contractType: 2,
       taskTypeKey: 3,

+ 46 - 10
src/views/warehouse/costmanagement.vue

@@ -51,7 +51,7 @@
     </BaseHeaderLayout>
       <el-table
         class="wenzi"
-        :data="warehouseList.records"
+        :data="warehouseList"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
@@ -90,7 +90,7 @@
       <el-dialog title="修改加权成本价格" :visible.sync="editvisible">
         <el-form >
           <el-form-item label="价格(元/吨)" >
-            <el-input v-model="price" autocomplete="off"></el-input>
+            <el-input placeholder="输入加权成本价格" v-model="price" autocomplete="off"></el-input>
           </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
@@ -101,14 +101,12 @@
   </div>
 </template>
 <script>
-import {
-  selectWarehouseSelf
-} from '@/model/houseSelfCollect/index'
 import {
   getcost,
   editcost,
   export1,
   editstatus,
+  getwarehousebase,
   billoperatehis,
   clearancee,
 } from '@/model/warehouse/index'
@@ -164,7 +162,13 @@ export default {
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       warehouseList: [],
-      warehouseList1: [],
+      warehouseList1: [{
+        value: '全部仓库',
+        id: '',
+        count: '',
+        purchasePriceList: [],
+        No:''
+      }],
       deptBudgetList: {},
       historyList: [],
       deptBudgetTotal: 0,
@@ -184,7 +188,7 @@ export default {
   },
   methods: {
     changeradio(e) {
-      this.getList()
+      this.selectWarehouse()
     },
     warehouselocation(){
       this.$router.push({ path: 'warehouselocation'})
@@ -212,6 +216,23 @@ export default {
       this.id=item.id
     },
     editprice(){
+      if(!this.price){
+            this.$message({
+              message: '价格不能为空!',
+              type: 'warning'
+            })
+            return
+        }
+      if(this.price<0||this.price>20000||(String(this.price).indexOf('.') != -1 &&
+						String(this.price).length -
+						(String(this.price).indexOf('.') +1) >
+						2)){
+            this.$message({
+              message: '价格输入错误!',
+              type: 'warning'
+            })
+            return
+        }
       this.$confirm(`加权成本价格修改后不可恢复,确认提交`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -241,12 +262,19 @@ export default {
       this.getList()
     },
     selectWarehouse(){
-       selectWarehouseSelf({
+       getwarehousebase({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:this.warehouseType
       })
         .toPromise()
         .then((response) => {
-          this.warehouseList1 = []
+          this.warehouseList1 = [{
+        value: '全部仓库',
+        id: '',
+        count: '',
+        purchasePriceList: [],
+        No:''
+      }]
           for (let i = 0; i < response.length; i++) {
             this.warehouseList1.push({
               value: response[i].warehouseName,
@@ -283,7 +311,15 @@ export default {
       })
         .toPromise()
         .then((response) => {
-          this.warehouseList = response
+          var arr=[]
+          for (let i = 0; i < response.records.length; i++) {
+            if(response.records[i].storage!=0){
+              response.records[i].value=(response.records[i].cost*response.records[i].storage).toFixed(1)
+              arr.push(response.records[i])
+            }
+            
+          }
+          this.warehouseList = arr
           this.deptBudgetTotal=response.total
         })
     },

+ 32 - 45
src/views/warehouse/warehouseManagementDelivery.vue

@@ -77,6 +77,7 @@
             <ws-input
               @input="grossWeightchange"
               v-model="deptBudgetList.grossWeight"
+              type="number" @mousewheel.native.prevent
               placeholder="请输入毛重"
               maxlength="20"
               size="small"
@@ -88,6 +89,7 @@
             <ws-input
               @input="tarechange"
               v-model="deptBudgetList.tare"
+              type="number" @mousewheel.native.prevent
               placeholder="请输入皮重"
               maxlength="100"
               size="small"
@@ -107,6 +109,7 @@
             <ws-input
               @input='pureweight'
               v-model="deptBudgetList.buckleWeightRatio"
+              type="number" @mousewheel.native.prevent
               placeholder="请输入扣重比"
               maxlength="100"
               size="small"
@@ -116,6 +119,7 @@
             <ws-input
             @input='pureweight'
               v-model="deptBudgetList.solidGrainWater"
+              type="number" @mousewheel.native.prevent
               placeholder="请输入干粮水分占比"
               maxlength="100"
               size="small"
@@ -125,6 +129,7 @@
             <ws-input
             @input='pureweight'
               v-model="deptBudgetList.tidalGrainWater"
+              type="number" @mousewheel.native.prevent
               placeholder="请输入潮粮水分占比"
               maxlength="100"
               size="small"
@@ -134,20 +139,12 @@
             <ws-input
               disabled
               v-model="deptBudgetList.pureWeight"
+              type="number" @mousewheel.native.prevent
               placeholder="不可编辑,自动计算"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
-          <!--净重(吨)-->
-          <ws-form-item label="扣款" span="1" prop="deductionAmount">
-            <ws-input
-              v-model="deptBudgetList.deductionAmount"
-              placeholder="请输入扣款金额"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
@@ -222,19 +219,22 @@
           </ws-form-item>
         </ws-info-table>
       </div>
-      <div class="small-title">上传仓库照片</div>
-      <ws-upload
-        ref="upload"
-        table-name="maintain_work_order"
-        oss-key="mainPlan"
-        :comp-id="compId"
-        :appendix-ids="appendixIdsAdd"
-        :vesselId="deptBudgetList.addressUrl"
-        :size-limit="size"
-        @uploadSuccess="uploadSuccess"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-      />
+      <div class="small-title">上传磅单照片</div>
+      <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div>
+            <img v-if='deptBudgetList.addressUrl' style='width:100px;height:100px;' :src="deptBudgetList.addressUrl" alt="">
+          </div>
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
         <!--自检员-->
@@ -255,6 +255,7 @@
               v-model="deptBudgetList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
               maxlength="120"
+              type="number" @mousewheel.native.prevent
               size="small"
             />
           </ws-form-item>
@@ -263,6 +264,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
+              type="number" @mousewheel.native.prevent
               maxlength="120"
               size="small"
             />
@@ -272,6 +274,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
+              type="number" @mousewheel.native.prevent
               maxlength="120"
               size="small"
             />
@@ -282,6 +285,7 @@
               v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
               maxlength="120"
+              type="number" @mousewheel.native.prevent
               size="small"
             />
           </ws-form-item>
@@ -290,6 +294,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
+              type="number" @mousewheel.native.prevent
               maxlength="120"
               size="small"
             />
@@ -299,6 +304,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完善粒占比"
+              type="number" @mousewheel.native.prevent
               maxlength="120"
               size="small"
             />
@@ -374,7 +380,6 @@ export default {
       outContractNo: [],
       appendixIdsAdd: '',
       uploadSuccess: {},
-      onChange: {},
       gradeList: [],
       agent: [],
        staffList: [],
@@ -423,6 +428,9 @@ export default {
     this.getList()
   },
   methods: {
+    uploadSuccessHandle1(res){
+      this.deptBudgetList.addressUrl=res.url
+    },
     //返回按钮
     revert() {
       this.$router.push({ path: 'warehouseManagementList' })
@@ -923,27 +931,6 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.deductionAmount) {
-        this.$message({
-          message: '扣款不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.deductionAmount < 0 ||
-        this.deptBudgetList.deductionAmount > 10000 ||
-        (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
-          String(this.deptBudgetList.deductionAmount).length -
-            (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '扣款输入错误',
-          type: 'warning'
-        })
-        return
-      }
 
       if (!this.deptBudgetList.agent) {
         this.$message({
@@ -1303,7 +1290,7 @@ export default {
           })
       }
       //合同编号
-      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
+      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'),flag:5  })
         .toPromise()
         .then((response) => {
           this.outContractNo = response

+ 13 - 10
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -88,16 +88,18 @@
             </template>
           </el-table-column>
         </el-table>
-
-        <div style="text-align: right; padding: 10px">
-          <el-button
-            class="bg-bottom-up"
-            type="primary"
-            size="small"
-            @click="returnWarehouse()"
-            >关闭</el-button
-          >
-        </div>
+<div style='text-align:center;'>
+   <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+</div>
+       
       </div>
     </ws-form>
   </div>
@@ -330,6 +332,7 @@ export default {
         })
           .toPromise()
           .then((response) => {
+            this.deptBudgetTotal=response.total
             this.improved = response
           })
       } else if (id2 == 2) {

+ 20 - 44
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -138,15 +138,6 @@
               size="small"
             />
           </ws-form-item>
-          <!--净重(吨)-->
-          <ws-form-item label="扣款" span="1" prop="deductionAmount">
-            <ws-input
-              v-model="dataList.deductionAmount"
-              placeholder="请输入扣款金额"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
@@ -222,19 +213,22 @@
           </ws-form-item>
         </ws-info-table>
       </div>
-      <div class="small-title">上传仓库照片</div>
-      <ws-upload
-        ref="upload"
-        table-name="maintain_work_order"
-        oss-key="mainPlan"
-        :comp-id="compId"
-        :appendix-ids="appendixIdsAdd"
-        :vesselId="dataList.addressUrl"
-        :size-limit="size"
-        @uploadSuccess="uploadSuccess"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-      />
+      <div class="small-title">上传磅单照片</div>
+      <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div>
+            <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
+          </div>
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
         <!--质检员-->
@@ -479,6 +473,9 @@ export default {
         this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
       }
     },
+    uploadSuccessHandle1(res){
+      this.dataList.addressUrl=res.url
+    },
     //返回按钮
     revert() {
       this.$router.go(-1)
@@ -661,27 +658,6 @@ export default {
         })
         return
       }
-      if (!this.dataList.deductionAmount) {
-        this.$message({
-          message: '扣款不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.deductionAmount < 0 ||
-        this.dataList.deductionAmount > 10000 ||
-        (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
-          String(this.dataList.deductionAmount).length -
-            (String(this.dataList.deductionAmount).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '扣款输入错误',
-          type: 'warning'
-        })
-        return
-      }
       if (!this.dataList.agent) {
         this.$message({
           message: '经办人不能为空',
@@ -1031,7 +1007,7 @@ export default {
           })
       }
       //合同编号
-      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
+      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'),flag:5 })
         .toPromise()
         .then((response) => {
           this.outContractNo = response

+ 32 - 20
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -196,8 +196,8 @@
             <el-date-picker
               v-model="dataList.inOutDate"
               placeholder="请选择入库日期"
-              type="datetime"
-              value-format="yyyy-MM-dd HH:mm:ss"
+              type="date"
+              value-format="yyyy-MM-dd"
             ></el-date-picker>
           </ws-form-item>
           <!-- 入库类型 -->
@@ -312,19 +312,22 @@
           </ws-info-table>
         </div>
       </div>
-      <div class="small-title">上传仓库照片</div>
-      <ws-upload
-        ref="upload"
-        table-name="maintain_work_order"
-        oss-key="mainPlan"
-        :comp-id="compId"
-        :appendix-ids="appendixIdsAdd"
-        :vesselId="dataList.addressUrl"
-        :size-limit="size"
-        @uploadSuccess="uploadSuccess"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-      />
+      <div class="small-title">上传磅单照片</div>
+       <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div>
+            <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
+          </div>
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
         <!--质检员-->
@@ -580,6 +583,9 @@ export default {
       this.dataList.deductionWeight=this.$route.query.deductionWeight
   },
   methods: {
+    uploadSuccessHandle1(res){
+      this.dataList.addressUrl=res.url
+    },
     pureweight(status){
       console.log(this.deptBudgetList)
       if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
@@ -1135,14 +1141,20 @@ export default {
           return
         }
         if (
-          (this.dataList.warehouseInOutDetail.bulkDensity &&
-            String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 &&
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
             String(this.dataList.warehouseInOutDetail.bulkDensity).length -
-              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) >
-              2) || this.dataList.warehouseInOutDetail.bulkDensity > 1000 || this.dataList.warehouseInOutDetail.bulkDensity < 0
+              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                '.'
+              ) +
+                1) >
+              0)
         ) {
           this.$message({
-            message: '容重输入错误',
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
             type: 'warning',
           })
           return

File diff suppressed because it is too large
+ 317 - 161
src/views/warehouse/warehouseManagementPut.vue


+ 6 - 6
src/views/warehouse/warehouseManagementRecord.vue

@@ -48,22 +48,22 @@
 						<template #default="props">
 							<ws-form ref="deptBudgetList" :model="deptBudgetList">
 								<ws-info-table>
-									<ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+									<ws-form-item label="水分(%)" span="1" prop="waterContent">
 										{{ props.row.waterContent }}
 									</ws-form-item>
-									<ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+									<ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
 										{{ props.row.bulkDensity }}
 									</ws-form-item>
-									<ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+									<ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
 										{{ props.row.jiaorenli }}
 									</ws-form-item>
-									<ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+									<ws-form-item label="杂质(%)" span="1" prop="impurity">
 										{{ props.row.impurity }}
 									</ws-form-item>
-									<ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+									<ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
 										{{ props.row.mildewGrain }}
 									</ws-form-item>
-									<ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+									<ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
 										{{ props.row.imperfectGrain }}
 									</ws-form-item>
 									<ws-form-item label="质检员" span="1" prop="qualityInspector">

+ 45 - 9
src/views/warehouse/warehouselocation.vue

@@ -45,7 +45,7 @@
                 </ws-select>
               <div :class='{"forbidden":forbidden1==true}' @click='add'><i class="el-icon-arrow-right"></i></div>
           </div>
-          <span>合计:{{count}}元</span>
+          <span v-if='warehouseList.records>0'>合计:{{count}}元</span>
         </div>
       </el-col>
       <el-col :span="12" class="bg-right">
@@ -92,9 +92,9 @@
         </el-table-column>
         <el-table-column prop="amount" label="金额(元)" >
         </el-table-column>
-        <el-table-column prop="storage" label="附件">
+        <el-table-column  prop="storage" label="附件">
             <template slot-scope="scope">
-                <img
+                <img v-if='scope.row.applUrl'
             width="18"
             height="20"
             style="vertical-align: text-top; position: relative; top: -1px"
@@ -102,6 +102,7 @@
             @click="fujian(scope.row)"
             alt=""
           />
+          <span v-else>暂无附件</span>
             </template>
         </el-table-column>
         <el-table-column  prop="costDate" label="日期">
@@ -166,13 +167,11 @@
   </div>
 </template>
 <script>
-import {
-  selectWarehouseSelf
-} from '@/model/houseSelfCollect/index'
 import {
   getinventory,
   addinventory,
   editinventory,
+  getwarehousebase,
   editcost,
   export1,
   editstatus,
@@ -256,7 +255,7 @@ export default {
     }
   },
   activated() {
-
+this.cangid=this.$route.query.cangId
       this.year=new Date().getFullYear()
       for(var i=this.start;i<=this.year;i++){
           this.yearList.push({value:i})
@@ -290,6 +289,7 @@ export default {
         this.applUrl=e.url
     },
     counttotal(){
+      this.count=0
         for (let i = 0; i < this.warehouseList.records.length; i++) {
             this.count+=this.warehouseList.records[i].amount
         }
@@ -322,6 +322,10 @@ export default {
         }
     },
     addInventory(){
+      if(this.dialogtitle=='编辑费用'){
+        this.editInventory()
+        return
+      }
         if(!this.expenseName){
             this.$message({
               message: '费用名称不能为空!',
@@ -343,7 +347,10 @@ export default {
             })
             return
         }
-        if(this.amount<0||this.amount>100000000){
+        if(this.amount<0||this.amount>100000000||(String(this.amount).indexOf('.') != -1 &&
+						String(this.amount).length -
+						(String(this.amount).indexOf('.') +1) >
+						2)){
             this.$message({
               message: '金额输入错误!',
               type: 'warning'
@@ -357,6 +364,9 @@ export default {
                 message: '添加成功',
               })
            this.addvisible=false
+           this.expenseName=''
+           this.amount=''
+           this.applUrl=''
            this.getList()
         })
     },
@@ -396,6 +406,9 @@ export default {
                 message: '编辑成功',
               })
            this.addvisible=false
+           this.expenseName=''
+           this.amount=''
+           this.applUrl=''
            this.getList()
         })
     },
@@ -468,8 +481,9 @@ export default {
       this.getList()
     },
     selectWarehouse(){
-       selectWarehouseSelf({
+       getwarehousebase({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:''
       })
         .toPromise()
         .then((response) => {
@@ -499,6 +513,28 @@ export default {
           }
           this.getList()
         })
+        getwarehousebase({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:2
+      })
+        .toPromise()
+        .then((response) => {
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList1.push({
+              value: response[i].warehouseName,
+              id: response[i].id,
+              count: response[i].count,
+              purchasePriceList: response[i].purchasePriceList,
+              No:response[i].commonWarehouseNo
+            })
+            if (this.cangid&&this.cangid == response[i].id) {
+              this.warehouseName = response[i].warehouseName
+              this.warehouseCount =  response[i].count
+              this.warehouseNo =  response[i].commonWarehouseNo
+              this.purchasePriceList =  response[i].purchasePriceList
+            } 
+          }
+        })
     },
     getList() {
       getinventory({

+ 30 - 12
src/views/warehouse/weightedsubsidiary.vue

@@ -119,6 +119,9 @@
         <el-table-column prop="costBefore" label="入库前加权成本" >
         </el-table-column>
         <el-table-column prop="costAfter" label="入库后加权成本" >
+          <template slot-scope="scope">
+            <div>{{scope.row.costAfter}}<span v-if='scope.row.grainType'>(改)</span></div>
+          </template>
         </el-table-column>
         <el-table-column  prop="createDate" label="更新日期">
         </el-table-column>
@@ -135,11 +138,10 @@
   </div>
 </template>
 <script>
-import {
-  selectWarehouseSelf
-} from '@/model/houseSelfCollect/index'
+
 import {
   weighteddetails,
+  getwarehousebase,
   editcost,
   export1,
   editstatus,
@@ -152,6 +154,7 @@ import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import { EventBus } from 'base-core-lib'
+import { toFixed } from 'xe-utils/methods'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -294,6 +297,7 @@ export default {
           this.cangid = this.warehouseList1[i].id
           this.WAREHOUSE[1].payname = this.warehouseList1[i].value
           this.purchasePriceList = this.warehouseList1[i].purchasePriceList
+          this.goodnameList=this.warehouseList1[i].goodsNameInfos
         }
       }
       this.getList()
@@ -318,8 +322,9 @@ export default {
       this.getList()
     },
     selectWarehouse(){
-       selectWarehouseSelf({
+       getwarehousebase({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:'',
       })
         .toPromise()
         .then((response) => {
@@ -330,7 +335,7 @@ export default {
               id: response[i].id,
               count: response[i].count,
               purchasePriceList: response[i].purchasePriceList,
-              No:response[i].commonWarehouseNo,
+              No:response[i].commonWarehouseNo, 
               goodsNameInfos:response[i].goodsNameInfos
             })
             if (this.cangid&&this.cangid == response[i].id) {
@@ -339,10 +344,15 @@ export default {
               this.warehouseNo =  response[i].commonWarehouseNo
               this.purchasePriceList =  response[i].purchasePriceList
               this.goodnameList=response[i].goodsNameInfos
-              if(this.goodnameList){
-              this.goodsName=this.goodnameList[0].goodsName
-              this.goodsNameKey=this.goodnameList[0].goodsNameKey
-            }
+              if(this.goodnameList.length>0){
+                if(this.goodnameList.some( function( item, index, array ){ return item.goodsName == '玉米'})){
+                  this.goodsName='玉米'
+                  this.goodsNameKey=1
+                }else{
+                  this.goodsName=this.goodnameList[0].goodsName
+                  this.goodsNameKey=this.goodnameList[0].goodsNameKey
+                }
+              }
             } 
           }
           if(this.warehouseList1.length > 0 && !this.cangid){
@@ -353,9 +363,14 @@ export default {
             this.purchasePriceList =  this.warehouseList1[0].purchasePriceList
             this.WAREHOUSE[1].payname = this.warehouseList1[0].value
             this.goodnameList=this.warehouseList1[0].goodsNameInfos
-            if(this.goodnameList){
-              this.goodsName=this.goodnameList[0].goodsName
-              this.goodsNameKey=this.goodnameList[0].goodsNameKey
+            if(this.goodnameList.length>0){
+              if(this.goodnameList.some( function( item, index, array ){ return item.goodsName == '玉米'})){
+                  this.goodsName='玉米'
+                  this.goodsNameKey=1
+                }else{
+                  this.goodsName=this.goodnameList[0].goodsName
+                  this.goodsNameKey=this.goodnameList[0].goodsNameKey
+                }
             }
           }
           this.getList()
@@ -372,6 +387,9 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          for (let i = 0; i < response.records.length; i++) {
+            response.records[i].toFixed(2)
+          }
           this.warehouseList = response
           this.deptBudgetTotal=response.total
           this.counttotal()

Some files were not shown because too many files changed in this diff