|
@@ -69,6 +69,7 @@
|
|
<!--净重(吨)-->
|
|
<!--净重(吨)-->
|
|
<ws-form-item label="净重(吨)" span="1" prop="netWeight">
|
|
<ws-form-item label="净重(吨)" span="1" prop="netWeight">
|
|
<ws-input
|
|
<ws-input
|
|
|
|
+ readonly="readonly"
|
|
v-model="deptBudgetList.netWeight"
|
|
v-model="deptBudgetList.netWeight"
|
|
placeholder="不可编辑,自动计算"
|
|
placeholder="不可编辑,自动计算"
|
|
maxlength="120"
|
|
maxlength="120"
|
|
@@ -133,7 +134,7 @@
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
|
|
|
|
<!--车牌号-->
|
|
<!--车牌号-->
|
|
- <ws-form-item label="车牌号" span="1" prop="sourceGoods">
|
|
|
|
|
|
+ <ws-form-item label="车牌号" span="1" prop="carNo">
|
|
<ws-input
|
|
<ws-input
|
|
v-model="deptBudgetList.carNo"
|
|
v-model="deptBudgetList.carNo"
|
|
placeholder="请输入车牌号"
|
|
placeholder="请输入车牌号"
|
|
@@ -297,6 +298,7 @@ export default {
|
|
// 提交类型
|
|
// 提交类型
|
|
submitType: true,
|
|
submitType: true,
|
|
storageType: [],
|
|
storageType: [],
|
|
|
|
+ readonly: true,
|
|
appendixIdsAdd: '',
|
|
appendixIdsAdd: '',
|
|
uploadSuccess: {},
|
|
uploadSuccess: {},
|
|
onChange: {},
|
|
onChange: {},
|
|
@@ -340,16 +342,22 @@ export default {
|
|
this.deptBudgetList.warehouseName = this.$route.query.warehouseName
|
|
this.deptBudgetList.warehouseName = this.$route.query.warehouseName
|
|
this.deptBudgetList.binNumber = this.$route.query.binNumber
|
|
this.deptBudgetList.binNumber = this.$route.query.binNumber
|
|
this.getList()
|
|
this.getList()
|
|
|
|
+ this.deptBudgetList.goodsName = '玉米'
|
|
|
|
+ this.deptBudgetList.goodsNameKey = '1'
|
|
|
|
+ this.deptBudgetList.grade = '一等品'
|
|
|
|
+ this.deptBudgetList.gradeKey = '1'
|
|
|
|
+ this.deptBudgetList.inOutType = '采购入库'
|
|
|
|
+ this.deptBudgetList.inOutTypeKey = '1'
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
- // //cg.viewBudget
|
|
|
|
- // //cg.viewSpareMoney
|
|
|
|
- // // this.getVesselData();
|
|
|
|
- // console.log(2222)
|
|
|
|
- // this.getList()
|
|
|
|
- // console.log(1111)
|
|
|
|
- // this.showType = this.isShow
|
|
|
|
- // this.getList(this.$route.query.baseId,)
|
|
|
|
|
|
+ // //cg.viewBudget
|
|
|
|
+ // //cg.viewSpareMoney
|
|
|
|
+ // // this.getVesselData();
|
|
|
|
+ // console.log(2222)
|
|
|
|
+ // this.getList()
|
|
|
|
+ // console.log(1111)
|
|
|
|
+ // this.showType = this.isShow
|
|
|
|
+ // this.getList(this.$route.query.baseId,)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//返回按钮
|
|
//返回按钮
|
|
@@ -358,58 +366,160 @@ export default {
|
|
},
|
|
},
|
|
//提交按钮
|
|
//提交按钮
|
|
submit() {
|
|
submit() {
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.deptBudgetList.inOutFlag = 2
|
|
|
|
- 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
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 暂存按钮
|
|
|
|
- returnWarehouse() {
|
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.deptBudgetList.statusFlag = 1
|
|
|
|
- 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.deptBudgetList.goodsName) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '货名不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.grossWeight < 0 ||
|
|
|
|
+ this.deptBudgetList.grossWeight > 10000 ||
|
|
|
|
+ (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.grossWeight).length -
|
|
|
|
+ (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
|
|
|
|
+ 3)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '毛重输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.tare < 0 ||
|
|
|
|
+ this.deptBudgetList.tare > 10000 ||
|
|
|
|
+ (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.tare).length -
|
|
|
|
+ (String(this.deptBudgetList.tare).indexOf('.') + 1) >
|
|
|
|
+ 3)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '皮重输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.car.length < 2 ||
|
|
|
|
+ this.deptBudgetList.agent.length > 10
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '经办人输入有误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.carNo.length > 7) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '车牌号输入错误,请输入7个字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.contractNo.length < 6 ||
|
|
|
|
+ this.deptBudgetList.contractNo.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '合同编号长度不符合要求,请输入6-20个字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$confirm(`确定提交入库信息`, {
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ type: 'warning',
|
|
})
|
|
})
|
|
- },ubmit() {
|
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.deptBudgetList.inOutFlag = 2
|
|
|
|
- addstorageputList(this.deptBudgetList)
|
|
|
|
- .toPromise()
|
|
|
|
- .then((response) => {
|
|
|
|
- this.$message.success('添加成功')
|
|
|
|
- this.$router.push({ path: 'warehouseManagementList' })
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.deptBudgetList.compId = sessionStorage.getItem(
|
|
|
|
+ 'ws-pf_compId'
|
|
|
|
+ )
|
|
|
|
+ this.deptBudgetList.inOutFlag = 2
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
return false
|
|
return false
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
temporaryStorage() {
|
|
temporaryStorage() {
|
|
|
|
+ if (!this.deptBudgetList.goodsName) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '货名不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.grossWeight < 0 ||
|
|
|
|
+ this.deptBudgetList.grossWeight > 10000 ||
|
|
|
|
+ (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.grossWeight).length -
|
|
|
|
+ (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
|
|
|
|
+ 3)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '毛重输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.tare < 0 ||
|
|
|
|
+ this.deptBudgetList.tare > 10000 ||
|
|
|
|
+ (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.tare).length -
|
|
|
|
+ (String(this.deptBudgetList.tare).indexOf('.') + 1) >
|
|
|
|
+ 3)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '皮重输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.car.length < 2 ||
|
|
|
|
+ this.deptBudgetList.agent.length > 10
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '经办人输入有误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.carNo.length > 7) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '车牌号输入错误,请输入7个字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.contractNo.length < 6 ||
|
|
|
|
+ this.deptBudgetList.contractNo.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '合同编号长度不符合要求,请输入6-20个字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
|
|
this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -438,7 +548,6 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
return false
|
|
return false
|
|
})
|
|
})
|
|
-
|
|
|
|
},
|
|
},
|
|
tarechange(e) {
|
|
tarechange(e) {
|
|
if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
@@ -609,9 +718,6 @@ export default {
|
|
/deep/.el-form-item__label {
|
|
/deep/.el-form-item__label {
|
|
width: 160px;
|
|
width: 160px;
|
|
}
|
|
}
|
|
-/deep/.el-input--small {
|
|
|
|
- width: 70%;
|
|
|
|
-}
|
|
|
|
//选填
|
|
//选填
|
|
/deep/.el-form-item {
|
|
/deep/.el-form-item {
|
|
width: 50%;
|
|
width: 50%;
|