|
@@ -2421,21 +2421,237 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- typeChange(e) {},
|
|
|
- pureweight(status) {
|
|
|
- console.log(this.deptBudgetList)
|
|
|
- if (
|
|
|
- this.deptBudgetList.netWeight &&
|
|
|
- this.deptBudgetList.tidalGrainWater &&
|
|
|
- this.deptBudgetList.solidGrainWater &&
|
|
|
- this.deptBudgetList.buckleWeightRatio
|
|
|
- ) {
|
|
|
- this.deptBudgetList.pureWeight =
|
|
|
- (this.deptBudgetList.netWeight *
|
|
|
- (100 -
|
|
|
- (this.deptBudgetList.tidalGrainWater -
|
|
|
- this.deptBudgetList.solidGrainWater) *
|
|
|
+ this.$confirm(`是否保存毛重检斤`, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
|
|
|
+ this.deptBudgetList.secretaryWeigher =
|
|
|
+ localStorage.getItem('ws-pf_staffName')
|
|
|
+ this.deptBudgetList.inOutFlag = 2
|
|
|
+ this.deptBudgetList.statusFlag = 1
|
|
|
+ let _data = JSON.parse(
|
|
|
+ localStorage.getItem('winseaview-userInfo')
|
|
|
+ )
|
|
|
+ this.deptBudgetList.backOffice =
|
|
|
+ _data.content.showCompName + '-' + _data.content.staffName
|
|
|
+ this.deptBudgetList.grossWeight /= 1000
|
|
|
+ this.deptBudgetList.tare /= 1000
|
|
|
+ this.deptBudgetList.netWeight /= 1000
|
|
|
+ this.deptBudgetList.pureWeight /= 1000
|
|
|
+ this.deptBudgetList.deductionAmount *= 1000
|
|
|
+ this.deptBudgetList.deductionWeight /= 1000
|
|
|
+ addstorageputList(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
+ this.$message.success('保存成功')
|
|
|
+ this.$router.push({
|
|
|
+ path: 'warehouseManagementList',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ tarechange(e) {
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.grossWeight &&
|
|
|
+ this.deptBudgetList.tare &&
|
|
|
+ (this.deptBudgetList.deductionWeight ||
|
|
|
+ this.deptBudgetList.deductionWeight == 0)
|
|
|
+ ) {
|
|
|
+ this.deptBudgetList.netWeight = Number(
|
|
|
+ this.deptBudgetList.grossWeight -
|
|
|
+ this.deptBudgetList.tare -
|
|
|
+ this.deptBudgetList.deductionWeight
|
|
|
+ ).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grossWeightchange(e) {
|
|
|
+ this.grossWeight = this.deptBudgetList.grossWeight
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.grossWeight &&
|
|
|
+ this.deptBudgetList.tare &&
|
|
|
+ (this.deptBudgetList.deductionWeight ||
|
|
|
+ this.deptBudgetList.deductionWeight == 0)
|
|
|
+ ) {
|
|
|
+ this.deptBudgetList.netWeight = Number(
|
|
|
+ this.deptBudgetList.grossWeight -
|
|
|
+ this.deptBudgetList.tare -
|
|
|
+ this.deptBudgetList.deductionWeight
|
|
|
+ ).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ contractNoChange(e) {
|
|
|
+ this.disabled1 = true
|
|
|
+ for (let i = 0; i < this.deptBudgetList1.length; i++) {
|
|
|
+ console.log(this.deptBudgetList1[i])
|
|
|
+ if (this.deptBudgetList1[i].inOutTaskNo == e) {
|
|
|
+ var data = this.deptBudgetList1[i]
|
|
|
+
|
|
|
+ if (this.deptBudgetList1[i].contractNo) {
|
|
|
+ this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!data) return
|
|
|
+ for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
+ if (
|
|
|
+ this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
|
|
|
+ ) {
|
|
|
+ console.log(this.outContractNo[i])
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
+ this.deptBudgetList.grade = this.outContractNo[i].grade
|
|
|
+ if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
+ if (!this.outContractNo[i].unitContractPrice) {
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips =
|
|
|
+ '卖方' +
|
|
|
+ this.outContractNo[i].seller +
|
|
|
+ '( ' +
|
|
|
+ this.outContractNo[i].unitContractPrice +
|
|
|
+ '元/吨)'
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutTypeKey = 1
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.deptBudgetList.goodsName = data.goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey = data.goodsNameKey
|
|
|
+ this.deptBudgetList.grade = data.grade
|
|
|
+ if (this.outContractNo[i].unitContractPrice) {
|
|
|
+ this.deptBudgetList.tips =
|
|
|
+ '出货库' +
|
|
|
+ data.sendWarehouse +
|
|
|
+ ' (' +
|
|
|
+ this.outContractNo[i].unitContractPrice +
|
|
|
+ '元/吨)'
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
|
+ }
|
|
|
+
|
|
|
+ this.deptBudgetList.inOutTypeKey = 3
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库出库') {
|
|
|
+ this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
|
+ } else if (this.outContractNo[i].inOutType == '暂存入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 4
|
|
|
+ } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 5
|
|
|
+ } else if (this.outContractNo[i].inOutType == '退库') {
|
|
|
+ if (this.outContractNo[i].contractNo) {
|
|
|
+ this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutTypeKey = 6
|
|
|
+ }
|
|
|
+ // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
|
|
|
+ this.cost = this.outContractNo[i].contractPrice
|
|
|
+ if (this.cost) {
|
|
|
+ this.isGetCost = true
|
|
|
+ this.deptBudgetList.cost =
|
|
|
+ this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ } else {
|
|
|
+ this.isGetCost = false
|
|
|
+ this.deptBudgetList.cost = this.deptBudgetList.cost
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
+ if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.isSelectType = false
|
|
|
+ } else {
|
|
|
+ this.isSelectType = true
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].priceType == '随行就市') {
|
|
|
+ this.disabled1 = !this.disabled1
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].deliverType == '1') {
|
|
|
+ this.carstatus = true
|
|
|
+ } else {
|
|
|
+ this.carstatus = false
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].tranCarInfoList) {
|
|
|
+ this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
+ this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
|
+ // this.carstatus = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ contractNoChange1(e) {
|
|
|
+ for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
+ if (this.outContractNo[i].contractNo == e) {
|
|
|
+ if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 1
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 3
|
|
|
+ } else if (this.outContractNo[i].inOutType == '暂存入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 4
|
|
|
+ } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 5
|
|
|
+ } else if (this.outContractNo[i].inOutType == '退库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 6
|
|
|
+ }
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
+ this.deptBudgetList.grade = this.outContractNo[i].grade
|
|
|
+ // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
|
|
|
+ this.cost = this.outContractNo[i].contractPrice
|
|
|
+ if (this.cost) {
|
|
|
+ this.isGetCost = true
|
|
|
+ this.deptBudgetList.cost =
|
|
|
+ this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ } else {
|
|
|
+ this.isGetCost = false
|
|
|
+ this.deptBudgetList.cost = this.deptBudgetList.cost
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
+ if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.isSelectType = false
|
|
|
+ } else {
|
|
|
+ this.isSelectType = true
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].deliverType == '1') {
|
|
|
+ this.carstatus = true
|
|
|
+ } else {
|
|
|
+ this.carstatus = false
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].tranCarInfoList) {
|
|
|
+ this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
+ this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
|
+ this.carstatus = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ typeChange(e) {},
|
|
|
+ pureweight(status) {
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.netWeight &&
|
|
|
+ this.deptBudgetList.tidalGrainWater &&
|
|
|
+ this.deptBudgetList.solidGrainWater &&
|
|
|
+ this.deptBudgetList.buckleWeightRatio
|
|
|
+ ) {
|
|
|
+ this.deptBudgetList.pureWeight =
|
|
|
+ (this.deptBudgetList.netWeight *
|
|
|
+ (100 -
|
|
|
+ (this.deptBudgetList.tidalGrainWater -
|
|
|
+ this.deptBudgetList.solidGrainWater) *
|
|
|
this.deptBudgetList.buckleWeightRatio)) /
|
|
|
100
|
|
|
}
|