|
@@ -48,7 +48,6 @@
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<ws-form-item label="客户" span="1" prop="customerName">
|
|
<ws-form-item label="客户" span="1" prop="customerName">
|
|
<ws-select
|
|
<ws-select
|
|
- v-model="inspect.customerName"
|
|
|
|
placeholder="请输入客户"
|
|
placeholder="请输入客户"
|
|
class="typeselect"
|
|
class="typeselect"
|
|
@change="selectpackingMethod"
|
|
@change="selectpackingMethod"
|
|
@@ -182,7 +181,8 @@
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
</ws-info-table>
|
|
</ws-info-table>
|
|
<div style="text-align: right; color: #323233">
|
|
<div style="text-align: right; color: #323233">
|
|
- 潮粮单价(元/公斤):{{ inspect.tidalGrainPrice ==null?"0": inspect.tidalGrainPrice}}
|
|
|
|
|
|
+ 潮粮单价(元/公斤):{{ unitPrice}}
|
|
|
|
+ <!-- 潮粮单价(元/公斤):{{ inspect.tidalGrainPrice == null?"0": inspect.tidalGrainPrice}} -->
|
|
</div>
|
|
</div>
|
|
<div class="but">
|
|
<div class="but">
|
|
<el-button @click="cancel" v-if="this.types != 2" type="primary"
|
|
<el-button @click="cancel" v-if="this.types != 2" type="primary"
|
|
@@ -223,7 +223,7 @@ export default {
|
|
// warehouseList: {},
|
|
// warehouseList: {},
|
|
inspect: {},
|
|
inspect: {},
|
|
disabled: false,
|
|
disabled: false,
|
|
- types: '',
|
|
|
|
|
|
+ types: '1',
|
|
information: '添加',
|
|
information: '添加',
|
|
goodnameList: [],
|
|
goodnameList: [],
|
|
gradeList: [],
|
|
gradeList: [],
|
|
@@ -231,14 +231,18 @@ export default {
|
|
getbinNumberList: [],
|
|
getbinNumberList: [],
|
|
cangid: '', //仓库id
|
|
cangid: '', //仓库id
|
|
warehouseName:'',
|
|
warehouseName:'',
|
|
- // calculation:''
|
|
|
|
|
|
+ unitPrice:0,
|
|
|
|
+ count:0,
|
|
|
|
+ cangNo:"",
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
this.types = this.$route.query.type
|
|
this.types = this.$route.query.type
|
|
this.cangid = this.$route.query.cangid
|
|
this.cangid = this.$route.query.cangid
|
|
- this.warehouseName = this.$route.warehouseName
|
|
|
|
|
|
+ this.warehouseName = this.$route.query.warehouseName
|
|
let id = this.$route.query.id
|
|
let id = this.$route.query.id
|
|
|
|
+ this.cangNo = this.$route.query.warehouseNo
|
|
|
|
+ this.count = Number(this.$route.query.count)+1
|
|
if (this.types == 2) {
|
|
if (this.types == 2) {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.information = '查看'
|
|
this.information = '查看'
|
|
@@ -264,30 +268,33 @@ export default {
|
|
return year + mouth + datetime
|
|
return year + mouth + datetime
|
|
},
|
|
},
|
|
calculation() {
|
|
calculation() {
|
|
- this.inspect.qualityNo = 'SGRK' + this.getdate()
|
|
|
|
|
|
+ let number ="000"+ this.count
|
|
|
|
+ number = number.substring(number.length - 4,number.length)
|
|
|
|
+ this.inspect.qualityNo = 'SGRK' + this.getdate()+this.cangNo+number //SGRK+8位时间+3位仓库编号+4位序列号
|
|
// + this.verifyinit()
|
|
// + this.verifyinit()
|
|
},
|
|
},
|
|
print() {
|
|
print() {
|
|
- if(this.types == 1){
|
|
|
|
|
|
+ this.inspect.warehouseName = this.warehouseName
|
|
|
|
+ this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
+ if(this.types == null){
|
|
this.$confirm('确定保存质检信息?', '提示', {
|
|
this.$confirm('确定保存质检信息?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- this.inspect.warehouseName = this.warehouseName
|
|
|
|
- this.inspect.compId = sessionStorage.getItem('ws-pf_compId'),
|
|
|
|
|
|
+
|
|
inspectAdd(this.inspect)
|
|
inspectAdd(this.inspect)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.$message.success('保存成功')
|
|
this.$message.success('保存成功')
|
|
// this.xx = true;
|
|
// this.xx = true;
|
|
- let newstr = document.getElementById('print').innerHTML
|
|
|
|
- let oldstr = document.body.innerHTML
|
|
|
|
- document.body.innerHTML = newstr
|
|
|
|
- window.print()
|
|
|
|
- document.body.innerHTML = oldstr
|
|
|
|
- // window.location.reload()
|
|
|
|
|
|
+ // let newstr = document.getElementById('print').innerHTML
|
|
|
|
+ // let oldstr = document.body.innerHTML
|
|
|
|
+ // document.body.innerHTML = newstr
|
|
|
|
+ // window.print()
|
|
|
|
+ // document.body.innerHTML = oldstr
|
|
|
|
+ // // window.location.reload()
|
|
this.$router.push({ path: 'paymentManagement' })
|
|
this.$router.push({ path: 'paymentManagement' })
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -308,11 +315,11 @@ export default {
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.$message.success('修改成功')
|
|
this.$message.success('修改成功')
|
|
// this.xx = true;
|
|
// this.xx = true;
|
|
- let newstr = document.getElementById('print').innerHTML
|
|
|
|
- let oldstr = document.body.innerHTML
|
|
|
|
- document.body.innerHTML = newstr
|
|
|
|
- window.print()
|
|
|
|
- document.body.innerHTML = oldstr
|
|
|
|
|
|
+ // let newstr = document.getElementById('print').innerHTML
|
|
|
|
+ // let oldstr = document.body.innerHTML
|
|
|
|
+ // document.body.innerHTML = newstr
|
|
|
|
+ // window.print()
|
|
|
|
+ // document.body.innerHTML = oldstr
|
|
// window.location.reload()
|
|
// window.location.reload()
|
|
this.$router.push({ path: 'paymentManagement' })
|
|
this.$router.push({ path: 'paymentManagement' })
|
|
})
|
|
})
|
|
@@ -329,7 +336,8 @@ export default {
|
|
},
|
|
},
|
|
waterContentChange() {
|
|
waterContentChange() {
|
|
//潮粮单价改变事件
|
|
//潮粮单价改变事件
|
|
- getinspectLookUnitPrice({
|
|
|
|
|
|
+ if(this.inspect.goodsName != null && this.inspect.waterContent != null && this.inspect.grade != null){
|
|
|
|
+ getinspectLookUnitPrice({
|
|
warehouseId: this.cangid,
|
|
warehouseId: this.cangid,
|
|
goodsName: this.inspect.goodsName,
|
|
goodsName: this.inspect.goodsName,
|
|
waterContent: this.inspect.waterContent,
|
|
waterContent: this.inspect.waterContent,
|
|
@@ -338,14 +346,18 @@ export default {
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.inspect.tidalGrainPrice = response
|
|
this.inspect.tidalGrainPrice = response
|
|
|
|
+ this.unitPrice = response
|
|
})
|
|
})
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
//货名改变事件
|
|
//货名改变事件
|
|
selectpackingMethod(e) {
|
|
selectpackingMethod(e) {
|
|
- let customers = e.split("(").split(")")[0]
|
|
|
|
|
|
+ let customers = e.split("(")
|
|
|
|
+ // customers = customers[1].split(")")
|
|
|
|
+
|
|
this.inspect.customerName = customers[0]
|
|
this.inspect.customerName = customers[0]
|
|
- this.inspect.customerPhone = customers[1]
|
|
|
|
- console.log()
|
|
|
|
|
|
+ this.inspect.customerPhone = customers[1].split(")")[0]
|
|
|
|
|
|
},
|
|
},
|
|
getList(ids) {
|
|
getList(ids) {
|