|
@@ -58,17 +58,17 @@
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<el-button type="primary" v-if="this.types == 2 || this.types == null">重新获取</el-button>
|
|
<el-button type="primary" v-if="this.types == 2 || this.types == null">重新获取</el-button>
|
|
<!-- <div class="formItem"> -->
|
|
<!-- <div class="formItem"> -->
|
|
- <ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="this.types == 1">
|
|
|
|
- <ws-input v-model="weighingList.netWeight" placeholder="请输入净重" maxlength="100"
|
|
|
|
- size="small" disabled />
|
|
|
|
- </ws-form-item>
|
|
|
|
|
|
+ <ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="this.types == 1">
|
|
|
|
+ <ws-input v-model="weighingList.netWeight" placeholder="请输入净重" maxlength="100" size="small"
|
|
|
|
+ disabled />
|
|
|
|
+ </ws-form-item>
|
|
<!-- </div> -->
|
|
<!-- </div> -->
|
|
<div class="bangdan">
|
|
<div class="bangdan">
|
|
<el-form-item label="上传磅单" v-if="this.types == 1">
|
|
<el-form-item label="上传磅单" v-if="this.types == 1">
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
|
|
<el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
|
|
- :on-success="(res, file) => {handlePictureCardPreview1(res)}" :on-remove="(value) => {handleRemove(value)}" class="photo2"
|
|
|
|
- v-if="this.types == 1">
|
|
|
|
|
|
+ :on-success="(res, file) => {handlePictureCardPreview1(res)}"
|
|
|
|
+ :on-remove="(value) => {handleRemove(value)}" class="photo2" v-if="this.types == 1">
|
|
<i class="el-icon-plus"></i>
|
|
<i class="el-icon-plus"></i>
|
|
</el-upload>
|
|
</el-upload>
|
|
<el-dialog :visible.sync="dialogVisible" v-if="this.types == 1">
|
|
<el-dialog :visible.sync="dialogVisible" v-if="this.types == 1">
|
|
@@ -105,13 +105,13 @@
|
|
storageNumber: '',
|
|
storageNumber: '',
|
|
buckleMiscellaneous: 0,
|
|
buckleMiscellaneous: 0,
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
- warehouseName: '',
|
|
|
|
},
|
|
},
|
|
disabled: false,
|
|
disabled: false,
|
|
disabled1: false,
|
|
disabled1: false,
|
|
disabled2: false,
|
|
disabled2: false,
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
getbinNumberList: [],
|
|
getbinNumberList: [],
|
|
|
|
+ warehouseName: '',
|
|
contractNoList: [],
|
|
contractNoList: [],
|
|
inOutType: [{
|
|
inOutType: [{
|
|
value: '销售出库',
|
|
value: '销售出库',
|
|
@@ -142,6 +142,7 @@
|
|
this.weighingList.carNumber = this.$route.query.carNumber
|
|
this.weighingList.carNumber = this.$route.query.carNumber
|
|
this.weighingList.goodsName = this.$route.query.goodsName
|
|
this.weighingList.goodsName = this.$route.query.goodsName
|
|
this.weighingList.inOutType = this.$route.query.inOutType
|
|
this.weighingList.inOutType = this.$route.query.inOutType
|
|
|
|
+ this.warehouseName = this.$route.query.warehouseName
|
|
let id = this.$route.query.id
|
|
let id = this.$route.query.id
|
|
this.relationId = this.$route.query.relationId
|
|
this.relationId = this.$route.query.relationId
|
|
this.warehouseId = this.$route.query.warehouseId
|
|
this.warehouseId = this.$route.query.warehouseId
|
|
@@ -222,8 +223,110 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
print() {
|
|
print() {
|
|
- (this.weighingList.secretaryWeigher =
|
|
|
|
- sessionStorage.getItem('ws-pf_staffName')),
|
|
|
|
|
|
+ if (this.types == null || this.types == 2) {
|
|
|
|
+ if (!this.weighingList.contractNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '合同编号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.weighingList.binNumber) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '仓位号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.weighingList.storageNumber) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '囤位号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.weighingList.storageNumber.length < 1 ||
|
|
|
|
+ this.weighingList.storageNumber.length > 10
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '囤位号不超过10个字符!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.weighingList.carNumber) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '车牌号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.weighingList.carNumber.length != 7
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '车牌号输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.weighingList.inOutType) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '出库类型不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // if (!this.weighingList.tare) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: '皮重不能为空',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // if (
|
|
|
|
+ // isNaN(this.weighingList.tare) ||
|
|
|
|
+ // (String(this.weighingList.tare).indexOf('.') != -1 &&
|
|
|
|
+ // String(this.weighingList.tare).length -
|
|
|
|
+ // (String(this.weighingList.tare).indexOf('.') + 1) >
|
|
|
|
+ // 1) ||
|
|
|
|
+ // this.weighingList.tare < 1 ||
|
|
|
|
+ // this.weighingList.tare > 100000
|
|
|
|
+ // ) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: '皮重输入错误!',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ if (this.types == 1) {
|
|
|
|
+ if (!this.weighingList.grossWeight) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '毛重不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ isNaN(this.weighingList.grossWeight) ||
|
|
|
|
+ (String(this.weighingList.grossWeight).indexOf('.') != -1 &&
|
|
|
|
+ String(this.weighingList.grossWeight).length -
|
|
|
|
+ (String(this.weighingList.grossWeight).indexOf('.') + 1) >
|
|
|
|
+ 1) ||
|
|
|
|
+ this.weighingList.grossWeight < 1 ||
|
|
|
|
+ this.weighingList.grossWeight > 100000
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '毛重输入错误!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.weighingList.warehouseName = this.warehouseName
|
|
|
|
+ this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName')
|
|
this.$confirm('确定保存检斤信息?', '提示', {
|
|
this.$confirm('确定保存检斤信息?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -243,8 +346,7 @@
|
|
path: 'weighingManagement'
|
|
path: 'weighingManagement'
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch((response) => {
|
|
|
|
- })
|
|
|
|
|
|
+ .catch((response) => {})
|
|
} else if (this.types == 2) {
|
|
} else if (this.types == 2) {
|
|
this.weighingList.warehouseId = this.warehouseId
|
|
this.weighingList.warehouseId = this.warehouseId
|
|
tareEdit(this.weighingList)
|
|
tareEdit(this.weighingList)
|
|
@@ -258,11 +360,10 @@
|
|
path: 'weighingManagement'
|
|
path: 'weighingManagement'
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch((response) => {
|
|
|
|
- })
|
|
|
|
|
|
+ .catch((response) => {})
|
|
} else if (this.types == null) {
|
|
} else if (this.types == null) {
|
|
this.weighingList.warehouseId = this.warehouseId
|
|
this.weighingList.warehouseId = this.warehouseId
|
|
- tareAdd(this.weighingList,this.warehouseName)
|
|
|
|
|
|
+ tareAdd(this.weighingList)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.$notify.success({
|
|
this.$notify.success({
|
|
@@ -273,8 +374,7 @@
|
|
path: 'weighingManagement'
|
|
path: 'weighingManagement'
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch((response) => {
|
|
|
|
- })
|
|
|
|
|
|
+ .catch((response) => {})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|