|
@@ -23,7 +23,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
|
|
|
+ <ws-form ref="dataList" :model="dataList" :rules="rules">
|
|
|
<div class="basicInformation">
|
|
|
<h2>
|
|
|
{{ this.deptBudgetList1.warehouseName }}库
|
|
@@ -36,7 +36,7 @@
|
|
|
<!-- 货名 -->
|
|
|
<ws-form-item label="货名" span="1">
|
|
|
<ws-select
|
|
|
- v-model="deptBudgetList.goodsName"
|
|
|
+ v-model="dataList.goodsName"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
|
@change="selectgoodsName"
|
|
@@ -53,7 +53,7 @@
|
|
|
<ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
|
|
|
<ws-input
|
|
|
@input="grossWeightchange"
|
|
|
- v-model="deptBudgetList.grossWeight"
|
|
|
+ v-model="dataList.grossWeight"
|
|
|
placeholder="请输入毛重"
|
|
|
maxlength="20"
|
|
|
size="small"
|
|
@@ -69,7 +69,7 @@
|
|
|
>
|
|
|
<ws-input
|
|
|
@input="tarechange"
|
|
|
- v-model="deptBudgetList.tare"
|
|
|
+ v-model="dataList.tare"
|
|
|
placeholder="请输入皮重"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
@@ -79,7 +79,8 @@
|
|
|
<!--净重(吨)-->
|
|
|
<ws-form-item label="净重(吨)" span="1" prop="netWeight">
|
|
|
<ws-input
|
|
|
- v-model.number="deptBudgetList.netWeight"
|
|
|
+ :readonly="readonly"
|
|
|
+ v-model.number="dataList.netWeight"
|
|
|
placeholder="不可编辑,自动计算"
|
|
|
type="number"
|
|
|
maxlength="120"
|
|
@@ -89,7 +90,7 @@
|
|
|
<!-- 品级 -->
|
|
|
<ws-form-item label="品级" span="1" class="readonly">
|
|
|
<ws-select
|
|
|
- v-model="deptBudgetList.grade"
|
|
|
+ v-model="dataList.grade"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
|
@change="selectpackingMethod"
|
|
@@ -106,7 +107,7 @@
|
|
|
<!--经办人-->
|
|
|
<ws-form-item label="经办人" span="1" prop="agent">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.agent"
|
|
|
+ v-model="dataList.agent"
|
|
|
placeholder="请输入出库经办人姓名"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
@@ -120,16 +121,16 @@
|
|
|
class="deliverydate"
|
|
|
>
|
|
|
<ws-date-picker
|
|
|
- v-model="deptBudgetList.inOutDate"
|
|
|
+ v-model="dataList.inOutDate"
|
|
|
type="date"
|
|
|
placeholder="请选择出库日期"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!-- 入库类型 -->
|
|
|
+ <!-- 出库类型 -->
|
|
|
<ws-form-item label="出库类型" span="1">
|
|
|
<ws-select
|
|
|
- v-model="deptBudgetList.inOutType"
|
|
|
+ v-model="dataList.inOutType"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
|
@change="selectstorageType"
|
|
@@ -146,7 +147,7 @@
|
|
|
<!--车牌号-->
|
|
|
<ws-form-item label="车牌号" span="1" prop="sourceGoods">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.carNo"
|
|
|
+ v-model="dataList.carNo"
|
|
|
placeholder="请输入车牌号"
|
|
|
maxlength="20"
|
|
|
size="small"
|
|
@@ -156,7 +157,7 @@
|
|
|
<!--合同编号-->
|
|
|
<ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.contractNo"
|
|
|
+ v-model="dataList.contractNo"
|
|
|
placeholder="请输入合同编号"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
@@ -171,7 +172,7 @@
|
|
|
oss-key="mainPlan"
|
|
|
:comp-id="compId"
|
|
|
:appendix-ids="appendixIdsAdd"
|
|
|
- :vesselId="deptBudgetList.addressUrl"
|
|
|
+ :vesselId="dataList.addressUrl"
|
|
|
:size-limit="size"
|
|
|
@uploadSuccess="uploadSuccess"
|
|
|
@onChange="onChange"
|
|
@@ -179,10 +180,10 @@
|
|
|
/>
|
|
|
<div class="small-title">化验数据(选填)</div>
|
|
|
<div class="inspector">
|
|
|
- <!--自检员-->
|
|
|
+ <!--质检员-->
|
|
|
<ws-form-item label="质检员" span="1" prop="qualityInspector">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
|
|
|
+ v-model="dataList.warehouseInOutDetail.qualityInspector"
|
|
|
placeholder="请输入质检员姓名"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -194,7 +195,7 @@
|
|
|
<!--水分(%)<=-->
|
|
|
<ws-form-item label="水分(%)<=" span="1" prop="waterContent">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.waterContent"
|
|
|
+ v-model="dataList.warehouseInOutDetail.waterContent"
|
|
|
placeholder="请输入水分占比"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -203,7 +204,7 @@
|
|
|
<!--杂质(%)<=-->
|
|
|
<ws-form-item label="杂质(%)<=" span="1" prop="impurity">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.impurity"
|
|
|
+ v-model="dataList.warehouseInOutDetail.impurity"
|
|
|
placeholder="请输入杂质占比"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -212,7 +213,7 @@
|
|
|
<!--容重(克/升)>=-->
|
|
|
<ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
|
|
|
+ v-model="dataList.warehouseInOutDetail.bulkDensity"
|
|
|
placeholder="请输入容重"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -221,7 +222,7 @@
|
|
|
<!--霉变粒(%)<=-->
|
|
|
<ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
|
|
|
+ v-model="dataList.warehouseInOutDetail.mildewGrain"
|
|
|
placeholder="请输入霉变粒占比"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -230,7 +231,7 @@
|
|
|
<!--热损伤(%)<=-->
|
|
|
<ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
|
|
|
+ v-model="dataList.warehouseInOutDetail.jiaorenli"
|
|
|
placeholder="请输入热损伤占比"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -239,7 +240,7 @@
|
|
|
<!--不完整粒(%)<=-->
|
|
|
<ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
|
|
|
+ v-model="dataList.warehouseInOutDetail.imperfectGrain"
|
|
|
placeholder="请输入不完整粒占比"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
@@ -271,6 +272,7 @@ import { pullDown, addstorageputList } from '@/model/warehouse/index'
|
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
+import { mapActions, mapGetters, mapState } from 'vuex'
|
|
|
// import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
|
import { dayjs, EventBus } from 'base-core-lib'
|
|
|
export default {
|
|
@@ -280,13 +282,15 @@ export default {
|
|
|
Pagination,
|
|
|
},
|
|
|
watch: {
|
|
|
- // vesselId(val) {
|
|
|
- // this.getList()
|
|
|
- // },
|
|
|
isShow(val) {
|
|
|
this.showType = val
|
|
|
},
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapGetters([
|
|
|
+ 'deptBudgetList',
|
|
|
+ ]),
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
//弹出框
|
|
@@ -300,6 +304,7 @@ export default {
|
|
|
showType: true,
|
|
|
// 年
|
|
|
year: '',
|
|
|
+ readonly:true,
|
|
|
deptBudgetTotal: 0,
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
@@ -336,7 +341,18 @@ export default {
|
|
|
month: dayjs().format('MM'),
|
|
|
},
|
|
|
contractList: [],
|
|
|
- deptBudgetList: {
|
|
|
+ dataList: {
|
|
|
+ id:'',
|
|
|
+ grossWeight:'',
|
|
|
+ contractNo:'',
|
|
|
+ tare:'',
|
|
|
+ netWeight:'',
|
|
|
+ grade:'',
|
|
|
+ agent:'',
|
|
|
+ carNo:'',
|
|
|
+ inOutDate:'',
|
|
|
+ inOutType:'',
|
|
|
+ goodsName:'',
|
|
|
warehouseInOutDetail: {},
|
|
|
},
|
|
|
historyList: [],
|
|
@@ -349,27 +365,38 @@ export default {
|
|
|
accessoryTFs: false,
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.deptBudgetList.baseId = this.$route.query.baseId
|
|
|
- this.deptBudgetList.positionId = this.$route.query.positionId
|
|
|
+ activated() {
|
|
|
this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
|
|
|
this.deptBudgetList1.binNumber = this.$route.query.binNumber
|
|
|
this.getList()
|
|
|
- this.deptBudgetList.goodsName= this.$route.query.goodsName
|
|
|
- this.deptBudgetList.grossWeight = this.$route.query.grossWeight
|
|
|
- this.deptBudgetList.tare = this.$route.query.tare
|
|
|
- this.deptBudgetList.netWeight = this.$route.query.netWeight
|
|
|
- this.deptBudgetList.grade = this.$route.query.grade
|
|
|
- this.deptBudgetList.agent = this.$route.query.agent
|
|
|
- this.deptBudgetList.carNo = this.$route.query.carNo
|
|
|
- this.deptBudgetList.inOutDate = this.$route.query.inOutDate
|
|
|
- this.deptBudgetList.contractNo = this.$route.query.contractNo
|
|
|
- this.deptBudgetList.inOutType = this.$route.query.inOutType
|
|
|
+ this.dataList.id=this.$route.query.id
|
|
|
+ this.dataList.grossWeight=this.$route.query.grossWeight
|
|
|
+ this.dataList.contractNo = this.$route.query.contractNo
|
|
|
+ this.dataList.baseId = this.$route.query.baseId
|
|
|
+ this.dataList.positionId = this.$route.query.positionId
|
|
|
+ this.dataList.warehouseName = this.$route.query.warehouseName
|
|
|
+ this.dataList.binNumber = this.$route.query.binNumber
|
|
|
+ this.dataList.tare = this.$route.query.tare
|
|
|
+ this.dataList.netWeight = this.$route.query.netWeight
|
|
|
+ this.dataList.grade = this.$route.query.grade
|
|
|
+ this.dataList.agent = this.$route.query.agent
|
|
|
+ this.dataList.carNo = this.$route.query.carNo
|
|
|
+ this.dataList.inOutDate = this.$route.query.inOutDate
|
|
|
+ this.dataList.contractNo = this.$route.query.contractNo
|
|
|
+ this.dataList.inOutType = this.$route.query.inOutType
|
|
|
+ this.dataList.compId = this.$route.query.compId
|
|
|
+ this.dataList.goodsName = this.$route.query.goodsName
|
|
|
+ this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
|
|
|
+ this.dataList.inOutFlag = this.$route.inOutFlag
|
|
|
+ this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
|
|
|
+ this.dataList.statusFlag = this.$route.statusFlag
|
|
|
+ this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
|
|
|
+ console.log(this.dataList)
|
|
|
},
|
|
|
methods: {
|
|
|
//返回按钮
|
|
|
revert() {
|
|
|
- this.$router.push({ path: 'warehouseManagementNoComplete' })
|
|
|
+ this.$router.go(-1)
|
|
|
},
|
|
|
//暂存按钮
|
|
|
temporaryStorage() {
|
|
@@ -379,14 +406,14 @@ export default {
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ this.$refs.dataList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem(
|
|
|
+ this.dataList.compId = sessionStorage.getItem(
|
|
|
'ws-pf_compId'
|
|
|
)
|
|
|
- this.deptBudgetList.inOutFlag = 1
|
|
|
- this.deptBudgetList.statusFlag = 1
|
|
|
- addstorageputList(this.deptBudgetList)
|
|
|
+ this.dataList.inOutFlag = 1
|
|
|
+ this.dataList.statusFlag = 1
|
|
|
+ addstorageputList(this.dataList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.$message.success('暂存成功')
|
|
@@ -404,83 +431,365 @@ export default {
|
|
|
},
|
|
|
//提交按钮
|
|
|
submit() {
|
|
|
+ if (!this.dataList.goodsName) {
|
|
|
+ this.$message({
|
|
|
+ message: '货名不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.grossWeight) {
|
|
|
+ this.$message({
|
|
|
+ message: '毛重不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
- this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
|
|
|
- deptBudgetList.warehouseInOutDetail.qualityInspector > 10
|
|
|
+ this.dataList.grossWeight <= 0 ||
|
|
|
+ this.dataList.grossWeight > 10000 ||
|
|
|
+ (String(this.dataList.grossWeight).indexOf('.') != -1 &&
|
|
|
+ String(this.dataList.grossWeight).length -
|
|
|
+ (String(this.dataList.grossWeight).indexOf('.') + 1) >
|
|
|
+ 3)
|
|
|
) {
|
|
|
this.$message({
|
|
|
- message: '质检员姓名长度错误!',
|
|
|
+ message: '毛重输入错误',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
- this.deptBudgetList.inOutFlag = 1
|
|
|
- this.deptBudgetList.statusFlag = 3
|
|
|
- addstorageputList(this.deptBudgetList)
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('添加成功')
|
|
|
- this.$router.push({ path: 'warehouseManagementList' })
|
|
|
- })
|
|
|
- } else {
|
|
|
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- return false
|
|
|
+ if (
|
|
|
+ this.dataList.tare < 0 ||
|
|
|
+ this.dataList.tare > 10000 ||
|
|
|
+ (String(this.dataList.tare).indexOf('.') != -1 &&
|
|
|
+ String(this.dataList.tare).length -
|
|
|
+ (String(this.dataList.tare).indexOf('.') + 1) >
|
|
|
+ 3)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '皮重输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.agent) {
|
|
|
+ this.$message({
|
|
|
+ message: '经办人不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.agent.length < 2 ||
|
|
|
+ this.dataList.agent.length > 10
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '经办人输入有误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.grade) {
|
|
|
+ this.$message({
|
|
|
+ message: '品级不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.inOutDate) {
|
|
|
+ this.$message({
|
|
|
+ message: '入库日期不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.inOutType) {
|
|
|
+ this.$message({
|
|
|
+ message: '入库类型不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.carNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '车牌号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.dataList.carNo.length > 7) {
|
|
|
+ this.$message({
|
|
|
+ message: '车牌号输入错误,请输入7个字符之内',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.contractNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同编号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.contractNo.length < 6 ||
|
|
|
+ this.dataList.contractNo.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同编号长度不符合要求,请输入6-20个字符之内',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.dataList.netWeight > this.$route.query.capacity) {
|
|
|
+ this.$message({
|
|
|
+ message: '入库量大于该仓库容量!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //自检员
|
|
|
+ if (this.dataList.warehouseInOutDetail.qualityInspector) {
|
|
|
+ if (
|
|
|
+ this.dataList.warehouseInOutDetail.qualityInspector.length <
|
|
|
+ 2 ||
|
|
|
+ this.dataList.warehouseInOutDetail.qualityInspector.length > 10
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '质检员姓名长度错误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- //暂存按钮
|
|
|
- returnWarehouse() {
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ }
|
|
|
+ if (this.dataList.warehouseInOutDetail.waterContent) {
|
|
|
+ if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
|
|
|
+ this.$message({
|
|
|
+ message: '水分(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.warehouseInOutDetail.waterContent < 1 ||
|
|
|
+ this.dataList.warehouseInOutDetail.waterContent > 40 ||
|
|
|
+ (String(
|
|
|
+ this.dataList.warehouseInOutDetail.waterContent
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.dataList.warehouseInOutDetail.waterContent)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.dataList.warehouseInOutDetail.waterContent
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //杂质
|
|
|
+ if (this.dataList.warehouseInOutDetail.impurity) {
|
|
|
+ if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
|
|
|
+ this.$message({
|
|
|
+ message: '杂质(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.warehouseInOutDetail.impurity < 1 ||
|
|
|
+ this.dataList.warehouseInOutDetail.impurity > 40 ||
|
|
|
+ (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.dataList.warehouseInOutDetail.impurity).length -
|
|
|
+ (String(
|
|
|
+ this.dataList.warehouseInOutDetail.impurity
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //霉变
|
|
|
+ if (this.dataList.warehouseInOutDetail.mildewGrain) {
|
|
|
+ if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
|
|
|
+ this.$message({
|
|
|
+ message: '霉变粒(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
|
|
|
+ this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
|
|
|
+ (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.dataList.warehouseInOutDetail.mildewGrain).length -
|
|
|
+ (String(
|
|
|
+ this.dataList.warehouseInOutDetail.mildewGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //热损伤
|
|
|
+ if (this.dataList.warehouseInOutDetail.jiaorenli) {
|
|
|
+ if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
|
|
|
+ this.$message({
|
|
|
+ message: '热损伤(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
|
|
|
+ this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
|
|
|
+ (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.dataList.warehouseInOutDetail.jiaorenli).length -
|
|
|
+ (String(
|
|
|
+ this.dataList.warehouseInOutDetail.jiaorenli
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //不完整粒(%)
|
|
|
+ if (this.dataList.warehouseInOutDetail.imperfectGrain) {
|
|
|
+ if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
|
|
|
+ this.$message({
|
|
|
+ message: '不完整粒(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
|
|
|
+ this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
|
|
|
+ (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
|
|
|
+ (String(
|
|
|
+ this.dataList.warehouseInOutDetail.imperfectGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //容重
|
|
|
+ if (this.dataList.warehouseInOutDetail.bulkDensity) {
|
|
|
+ if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重(克/升)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ 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) >
|
|
|
+ 0)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.dataList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
- this.deptBudgetList.statusFlag = 1
|
|
|
- addstorageputList(this.deptBudgetList)
|
|
|
+ this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
+ this.dataList.inOutFlag = 1
|
|
|
+ this.dataList.statusFlag = 3
|
|
|
+ addstorageputList(this.dataList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.$message.success('添加成功')
|
|
|
this.$router.push({ path: 'warehouseManagementList' })
|
|
|
})
|
|
|
} else {
|
|
|
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
tarechange(e) {
|
|
|
- if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
|
- this.deptBudgetList.netWeight = Number(
|
|
|
- this.deptBudgetList.grossWeight - this.deptBudgetList.tare
|
|
|
+ if (this.dataList.grossWeight && this.dataList.tare) {
|
|
|
+ this.dataList.netWeight = Number(
|
|
|
+ this.dataList.grossWeight - this.dataList.tare
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
grossWeightchange(e) {
|
|
|
- if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
|
- this.deptBudgetList.netWeight = Number(
|
|
|
- this.deptBudgetList.grossWeight - this.deptBudgetList.tare
|
|
|
+ if (this.dataList.grossWeight && this.dataList.tare) {
|
|
|
+ this.dataList.netWeight = Number(
|
|
|
+ this.dataList.grossWeight - this.dataList.tare
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
selectgoodsName(e) {
|
|
|
for (var i = 0; i < this.goodnameList.length; i++) {
|
|
|
if (this.goodnameList[i].constValue == e) {
|
|
|
- this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
|
|
|
+ this.dataList.goodsNameKey = this.goodnameList[i].constKey
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
selectpackingMethod(e) {
|
|
|
for (var i = 0; i < this.packtypeList.length; i++) {
|
|
|
if (this.packtypeList[i].constValue == e) {
|
|
|
- this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
|
|
|
+ this.dataList.packingMethodKey = this.packtypeList[i].constKey
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
selectstorageType(e) {
|
|
|
for (var i = 0; i < this.storageType.length; i++) {
|
|
|
if (this.storageType[i].constValue == e) {
|
|
|
- this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
|
|
|
+ this.dataList.inOutTypeKey = this.storageType[i].constKey
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -511,7 +820,7 @@ export default {
|
|
|
this.gradeList = response
|
|
|
})
|
|
|
// 类型
|
|
|
- pullDown({ constId: 'CON5' })
|
|
|
+ pullDown({ constId: 'CON6' })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.storageType = response
|
|
@@ -557,31 +866,6 @@ export default {
|
|
|
this.historyList = response
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- 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',
|
|
|
- })
|
|
|
- },
|
|
|
- // deletecontract(){},
|
|
|
//删除
|
|
|
approve() {},
|
|
|
listQuery() {},
|
|
@@ -645,7 +929,6 @@ export default {
|
|
|
/deep/.el-form-item__label {
|
|
|
width: 160px;
|
|
|
}
|
|
|
-
|
|
|
//选填
|
|
|
/deep/.el-form-item {
|
|
|
width: 50%;
|
|
@@ -690,6 +973,9 @@ export default {
|
|
|
text-align: left;
|
|
|
margin-left: 0px;
|
|
|
}
|
|
|
+/deep/[data-v-d228e17e] .el-form-item__label {
|
|
|
+ width: 60px;
|
|
|
+}
|
|
|
.small-title {
|
|
|
position: relative;
|
|
|
padding: 10px;
|
|
@@ -719,7 +1005,7 @@ export default {
|
|
|
background-color: #f6f7fc;
|
|
|
}
|
|
|
/deep/.neifor .el-input--small .el-input__inner {
|
|
|
- width: 120%;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
.el-input__inner {
|
|
|
width: 150px;
|