|
@@ -6709,133 +6709,145 @@ export default {
|
|
|
},
|
|
|
//撤销请核
|
|
|
revoke() {
|
|
|
- revoke(this.form.fId).then(async(data) => {
|
|
|
- if (data.code === 200) {
|
|
|
- this.browseStatus = false
|
|
|
- await getWarehousebills(this.form.fId).then((response) => {
|
|
|
- this.form = response.data.warehousebills
|
|
|
- if (this.form.fBillstatus > 3) {
|
|
|
- this.approvalStatus = false
|
|
|
- this.browseStatus = true
|
|
|
- } else {
|
|
|
- this.approvalStatus = true
|
|
|
- this.browseStatus = false
|
|
|
- }
|
|
|
- this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
|
|
|
- this.$set(this.form, 'fBstime', Date.parse(this.form.fBstime))
|
|
|
- this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
- this.$set(this.form, 'fFeetUnit', this.form.fFeetunit)
|
|
|
- this.tfNetweightnum = (this.form.fPlannetweight / 1000).toFixed(4)
|
|
|
- this.tfGrossweightnum = (this.form.fPlangrossweight / 1000).toFixed(4)
|
|
|
- if (this.form.fCartype || this.form.fCartype == 0) {
|
|
|
- this.$set(this.form, 'fCartype', this.form.fCartype.toString())
|
|
|
- }
|
|
|
- if (this.form.fStltypeid || this.form.fStltypeid == 0) {
|
|
|
- this.$set(this.form, 'fStltypeid', this.form.fStltypeid.toString())
|
|
|
- }
|
|
|
- if (this.form.fTrademodeid) {
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- 'fTrademodeid',
|
|
|
- this.form.fTrademodeid.toString()
|
|
|
- )
|
|
|
- }
|
|
|
- if (!this.copyStatus) {
|
|
|
- if (response.data.warehouseBillsItem) {
|
|
|
- response.data.warehouseBillsItem.map((e) => {
|
|
|
- e.fBsdate = Date.parse(e.fBsdate)
|
|
|
- e.fBusinessType = e.fBusinessType.toString()
|
|
|
- e.fLntype = e.fLntype ? e.fLntype.toString() : null
|
|
|
- })
|
|
|
- this.detailList = response.data.warehouseBillsItem
|
|
|
+ this.$confirm("是否撤销请核?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ revoke(this.form.fId).then(async(data) => {
|
|
|
+ if (data.code === 200) {
|
|
|
+ this.browseStatus = false
|
|
|
+ await getWarehousebills(this.form.fId).then((response) => {
|
|
|
+ this.form = response.data.warehousebills
|
|
|
+ if (this.form.fBillstatus > 3) {
|
|
|
+ this.approvalStatus = false
|
|
|
+ this.browseStatus = true
|
|
|
} else {
|
|
|
- this.detailList = []
|
|
|
+ this.approvalStatus = true
|
|
|
+ this.browseStatus = false
|
|
|
}
|
|
|
- response.data.warehousebillsfeesCr.map((e) => {
|
|
|
- if (e.fFeeunitid) {
|
|
|
- e.fFeeUnitid = e.fFeeunitid.toString()
|
|
|
- }
|
|
|
- if (e.fStltypeid || e.fStltypeid == 0) {
|
|
|
- e.fStltypeid = e.fStltypeid.toString()
|
|
|
+ this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
|
|
|
+ this.$set(this.form, 'fBstime', Date.parse(this.form.fBstime))
|
|
|
+ this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
+ this.$set(this.form, 'fFeetUnit', this.form.fFeetunit)
|
|
|
+ this.tfNetweightnum = (this.form.fPlannetweight / 1000).toFixed(4)
|
|
|
+ this.tfGrossweightnum = (this.form.fPlangrossweight / 1000).toFixed(4)
|
|
|
+ if (this.form.fCartype || this.form.fCartype == 0) {
|
|
|
+ this.$set(this.form, 'fCartype', this.form.fCartype.toString())
|
|
|
+ }
|
|
|
+ if (this.form.fStltypeid || this.form.fStltypeid == 0) {
|
|
|
+ this.$set(this.form, 'fStltypeid', this.form.fStltypeid.toString())
|
|
|
+ }
|
|
|
+ if (this.form.fTrademodeid) {
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ 'fTrademodeid',
|
|
|
+ this.form.fTrademodeid.toString()
|
|
|
+ )
|
|
|
+ }
|
|
|
+ if (!this.copyStatus) {
|
|
|
+ if (response.data.warehouseBillsItem) {
|
|
|
+ response.data.warehouseBillsItem.map((e) => {
|
|
|
+ e.fBsdate = Date.parse(e.fBsdate)
|
|
|
+ e.fBusinessType = e.fBusinessType.toString()
|
|
|
+ e.fLntype = e.fLntype ? e.fLntype.toString() : null
|
|
|
+ })
|
|
|
+ this.detailList = response.data.warehouseBillsItem
|
|
|
+ } else {
|
|
|
+ this.detailList = []
|
|
|
}
|
|
|
- })
|
|
|
- this.warehouseCrList = response.data.warehousebillsfeesCr
|
|
|
- response.data.warehousebillsfeesDr.map((e) => {
|
|
|
- if (e.fFeeunitid) {
|
|
|
- e.fFeeUnitid = e.fFeeunitid.toString()
|
|
|
+ response.data.warehousebillsfeesCr.map((e) => {
|
|
|
+ if (e.fFeeunitid) {
|
|
|
+ e.fFeeUnitid = e.fFeeunitid.toString()
|
|
|
+ }
|
|
|
+ if (e.fStltypeid || e.fStltypeid == 0) {
|
|
|
+ e.fStltypeid = e.fStltypeid.toString()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.warehouseCrList = response.data.warehousebillsfeesCr
|
|
|
+ response.data.warehousebillsfeesDr.map((e) => {
|
|
|
+ if (e.fFeeunitid) {
|
|
|
+ e.fFeeUnitid = e.fFeeunitid.toString()
|
|
|
+ }
|
|
|
+ if (e.fStltypeid || e.fStltypeid == 0) {
|
|
|
+ e.fStltypeid = e.fStltypeid.toString()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.warehouseDrList = response.data.warehousebillsfeesDr
|
|
|
+ this.warehouseDrList.forEach(item => item.fBillingway = JSON.stringify(item.fBillingway))
|
|
|
+ if (response.data.tCntrList) {
|
|
|
+ this.CntrTable = response.data.tCntrList
|
|
|
+ } else {
|
|
|
+ this.CntrTable = []
|
|
|
}
|
|
|
- if (e.fStltypeid || e.fStltypeid == 0) {
|
|
|
- e.fStltypeid = e.fStltypeid.toString()
|
|
|
+ if (response.data.enclosures) {
|
|
|
+ this.relevantAttachments = response.data.enclosures
|
|
|
}
|
|
|
- })
|
|
|
- this.warehouseDrList = response.data.warehousebillsfeesDr
|
|
|
- this.warehouseDrList.forEach(item => item.fBillingway = JSON.stringify(item.fBillingway))
|
|
|
- if (response.data.tCntrList) {
|
|
|
- this.CntrTable = response.data.tCntrList
|
|
|
} else {
|
|
|
- this.CntrTable = []
|
|
|
+ this.$set(this.form, 'fId', null)
|
|
|
+ this.$set(this.form, 'fMblno', null)
|
|
|
+ this.$set(this.form, 'fMarks', null)
|
|
|
+ this.$set(this.form, 'fProductName', null)
|
|
|
+ this.$set(this.form, 'fNetweight', 0)
|
|
|
+ this.$set(this.form, 'fPlanvolumn', 0)
|
|
|
+ this.$set(this.form, 'fGrossweight', 0)
|
|
|
}
|
|
|
- if (response.data.enclosures) {
|
|
|
- this.relevantAttachments = response.data.enclosures
|
|
|
+ })
|
|
|
+ this.warehouseCrList.forEach((item, index) => {
|
|
|
+ if (item.fQty != 0 && item.fUnitprice !== 0 && item.fAmount !== 0) {
|
|
|
+ item.fBillstatus = 6
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$set(this.form, 'fId', null)
|
|
|
- this.$set(this.form, 'fMblno', null)
|
|
|
- this.$set(this.form, 'fMarks', null)
|
|
|
- this.$set(this.form, 'fProductName', null)
|
|
|
- this.$set(this.form, 'fNetweight', 0)
|
|
|
- this.$set(this.form, 'fPlanvolumn', 0)
|
|
|
- this.$set(this.form, 'fGrossweight', 0)
|
|
|
- }
|
|
|
- })
|
|
|
- this.warehouseCrList.forEach((item, index) => {
|
|
|
- if (item.fQty != 0 && item.fUnitprice !== 0 && item.fAmount !== 0) {
|
|
|
- item.fBillstatus = 6
|
|
|
- }
|
|
|
- })
|
|
|
- let formData = new window.FormData()
|
|
|
- formData.append('warehouseBills', JSON.stringify(this.form))
|
|
|
- this.detailList.forEach(item => {
|
|
|
- if (item.srcId !== null) {
|
|
|
- // item.fStorageFeeDeadline = item.fBsdate
|
|
|
- }
|
|
|
- })
|
|
|
- // 费用明细付款
|
|
|
- formData.append(
|
|
|
- 'warehousebillsfeesCr',
|
|
|
- JSON.stringify(this.warehouseCrList)
|
|
|
- )
|
|
|
+ })
|
|
|
+ let formData = new window.FormData()
|
|
|
+ formData.append('warehouseBills', JSON.stringify(this.form))
|
|
|
+ this.detailList.forEach(item => {
|
|
|
+ if (item.srcId !== null) {
|
|
|
+ // item.fStorageFeeDeadline = item.fBsdate
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 费用明细付款
|
|
|
+ formData.append(
|
|
|
+ 'warehousebillsfeesCr',
|
|
|
+ JSON.stringify(this.warehouseCrList)
|
|
|
+ )
|
|
|
|
|
|
- // 库存明细
|
|
|
- formData.append(
|
|
|
- 'warehousebillsitems',
|
|
|
- JSON.stringify(this.detailList)
|
|
|
- )
|
|
|
- formData.append(
|
|
|
- 'tEnclosure',
|
|
|
- JSON.stringify(this.relevantAttachments)
|
|
|
- )
|
|
|
+ // 库存明细
|
|
|
+ formData.append(
|
|
|
+ 'warehousebillsitems',
|
|
|
+ JSON.stringify(this.detailList)
|
|
|
+ )
|
|
|
+ formData.append(
|
|
|
+ 'tEnclosure',
|
|
|
+ JSON.stringify(this.relevantAttachments)
|
|
|
+ )
|
|
|
|
|
|
- // 收款
|
|
|
- formData.append(
|
|
|
- 'warehousebillsfeesDr',
|
|
|
- JSON.stringify(this.warehouseDrList)
|
|
|
- )
|
|
|
- formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
|
|
|
- formData.append('tCntr', JSON.stringify(this.CntrTable))
|
|
|
- addWarehousebills(formData).then(res => {
|
|
|
- })
|
|
|
- this.msgSuccess('撤销成功')
|
|
|
- }
|
|
|
- })
|
|
|
+ // 收款
|
|
|
+ formData.append(
|
|
|
+ 'warehousebillsfeesDr',
|
|
|
+ JSON.stringify(this.warehouseDrList)
|
|
|
+ )
|
|
|
+ formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
|
|
|
+ formData.append('tCntr', JSON.stringify(this.CntrTable))
|
|
|
+ addWarehousebills(formData).then(res => {
|
|
|
+ })
|
|
|
+ this.msgSuccess('撤销成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
ordersRevoke() {
|
|
|
- ordersRevoke(this.form.fId).then((data) => {
|
|
|
- if (data.code === 200) {
|
|
|
- this.$set(this.form, 'warehouseStatus', 2)
|
|
|
- this.msgSuccess('撤销成功')
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$confirm("是否撤销接单请核?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ ordersRevoke(this.form.fId).then((data) => {
|
|
|
+ if (data.code === 200) {
|
|
|
+ this.$set(this.form, 'warehouseStatus', 2)
|
|
|
+ this.msgSuccess('撤销成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
//撤销审批
|
|
|
revokeTwo(status) {
|
|
@@ -6845,15 +6857,21 @@ export default {
|
|
|
id: this.form.fId,
|
|
|
fidStatus: status
|
|
|
}
|
|
|
- revokeTwo(data).then((data) => {
|
|
|
- if (data.code === 200) {
|
|
|
- this.browseStatus = false
|
|
|
- this.msgSuccess('撤销成功')
|
|
|
- if (status) {
|
|
|
- this.$set(this.form, 'warehouseStatus', 2)
|
|
|
+ this.$confirm("是否撤销审批?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ revokeTwo(data).then((data) => {
|
|
|
+ if (data.code === 200) {
|
|
|
+ this.browseStatus = false
|
|
|
+ this.msgSuccess('撤销成功')
|
|
|
+ if (status) {
|
|
|
+ this.$set(this.form, 'warehouseStatus', 2)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
// 查看审批流
|
|
|
getDataList() {
|
|
@@ -7696,14 +7714,20 @@ export default {
|
|
|
)
|
|
|
formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
|
|
|
formData.append('tCntr', JSON.stringify(this.CntrTable))
|
|
|
- warehouseSubmission(formData).then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
- this.msgSuccess('提交成功')
|
|
|
- setTimeout(() => {
|
|
|
- this.cancel()
|
|
|
- }, 200)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$confirm("是否发起请核?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ warehouseSubmission(formData).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.msgSuccess('提交成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.cancel()
|
|
|
+ }, 200)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -7854,13 +7878,19 @@ export default {
|
|
|
)
|
|
|
formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
|
|
|
formData.append('tCntr', JSON.stringify(this.CntrTable))
|
|
|
- submitWarehousingApproval(formData).then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
- this.msgSuccess('请核成功')
|
|
|
- this.$set(this.form, 'warehouseStatus', 4)
|
|
|
- this.cancel()
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$confirm("是否发起接单请核?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ submitWarehousingApproval(formData).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.msgSuccess('请核成功')
|
|
|
+ this.$set(this.form, 'warehouseStatus', 4)
|
|
|
+ this.cancel()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -9380,33 +9410,45 @@ export default {
|
|
|
},
|
|
|
// 费用明细请核
|
|
|
listCheck(row) {
|
|
|
- feesCheck(row.fId).then(res => {
|
|
|
- this.$message.success('请核成功')
|
|
|
- res.data.fFeeUnitid = res.data.fFeeunitid.toString()
|
|
|
- res.data.fStltypeid = res.data.fStltypeid.toString()
|
|
|
- if (res.data.fDc == 'D') {
|
|
|
- let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
|
|
|
- this.warehouseDrList.splice(index, 1, res.data)
|
|
|
- } else {
|
|
|
- let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
|
|
|
- this.warehouseCrList.splice(index, 1, res.data)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$confirm("是否发起费用明细请核?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ feesCheck(row.fId).then(res => {
|
|
|
+ this.$message.success('请核成功')
|
|
|
+ res.data.fFeeUnitid = res.data.fFeeunitid.toString()
|
|
|
+ res.data.fStltypeid = res.data.fStltypeid.toString()
|
|
|
+ if (res.data.fDc == 'D') {
|
|
|
+ let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
|
|
|
+ this.warehouseDrList.splice(index, 1, res.data)
|
|
|
+ } else {
|
|
|
+ let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
|
|
|
+ this.warehouseCrList.splice(index, 1, res.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
// 费用明细撤销请核
|
|
|
revokeListCheck(row) {
|
|
|
- revokefeeCheck(row.fId).then(res => {
|
|
|
- res.data.fFeeUnitid = res.data.fFeeunitid.toString()
|
|
|
- res.data.fStltypeid = res.data.fStltypeid.toString()
|
|
|
- this.$message.success('操作成功')
|
|
|
- if (res.data.fDc == 'D') {
|
|
|
- let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
|
|
|
- this.warehouseDrList.splice(index, 1, res.data)
|
|
|
- } else {
|
|
|
- let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
|
|
|
- this.warehouseCrList.splice(index, 1, res.data)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$confirm("是否撤销请核?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ revokefeeCheck(row.fId).then(res => {
|
|
|
+ res.data.fFeeUnitid = res.data.fFeeunitid.toString()
|
|
|
+ res.data.fStltypeid = res.data.fStltypeid.toString()
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ if (res.data.fDc == 'D') {
|
|
|
+ let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
|
|
|
+ this.warehouseDrList.splice(index, 1, res.data)
|
|
|
+ } else {
|
|
|
+ let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
|
|
|
+ this.warehouseCrList.splice(index, 1, res.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
// 获取仓库信息
|
|
|
warehouseChange() {
|