|
@@ -534,11 +534,17 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
// TODO:接口完善后,type 应改为 add(暂时为了回显数据)
|
|
|
this.loading = true
|
|
|
+ this.$refs.unitTabs.mList = []
|
|
|
+ this.$refs.unitTabs.fList = []
|
|
|
var Staging = '',
|
|
|
- StagingLast = ''
|
|
|
+ StagingLast = '',
|
|
|
+ file = ''
|
|
|
if(data=='queryNew'){
|
|
|
Staging =this.detailsPlanNum.memo
|
|
|
StagingLast = this.detailsPlanNum.remarks
|
|
|
+ file = this.fileList
|
|
|
+ this.$refs.unitTabs.mList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationFabricList
|
|
|
+ this.$refs.unitTabs.fList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationIngredientList
|
|
|
}
|
|
|
seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
|
|
|
if (res.success) {
|
|
@@ -546,10 +552,6 @@ export default {
|
|
|
this.loading = false
|
|
|
this.detailsPlanNum = res.result //所有详情
|
|
|
this.copyFabriccostIncludestax = res.result.fabriccostIncludestax
|
|
|
- if(data=='queryNew'){
|
|
|
- this.detailsPlanNum.memo = Staging
|
|
|
- this.detailsPlanNum.remarks = StagingLast
|
|
|
- }
|
|
|
if(Number(this.detailsPlanNum.shortseveral)<0){
|
|
|
this.detailsPlanNum.shortseveral = 0
|
|
|
this.detailsPlanNum.shortvalue = 0
|
|
@@ -668,6 +670,25 @@ export default {
|
|
|
current: res.result.current,
|
|
|
pageSize: res.result.size
|
|
|
}
|
|
|
+ if(data=='queryNew'){
|
|
|
+ this.detailsPlanNum.memo = Staging
|
|
|
+ this.detailsPlanNum.remarks = StagingLast
|
|
|
+ this.fileList = file
|
|
|
+ oneData.syCostAllocationFabricList.map(item=>{
|
|
|
+ this.$refs.unitTabs.mList.map(event=>{
|
|
|
+ if(item.goodsName==event.goodsName){
|
|
|
+ item.transferCost = event.transferCost
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
+ this.$refs.unitTabs.fList.map(event=>{
|
|
|
+ if(item.goodsName==event.goodsName){
|
|
|
+ item.transferCost = event.transferCost
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}else {
|
|
|
this.loading = false
|
|
|
this.$message.error(res.message);
|
|
@@ -948,8 +969,10 @@ export default {
|
|
|
// var planNum = this.detailsPlanNum.planNum,
|
|
|
var json = this.detailsPlanNum
|
|
|
json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
|
|
|
+ this.loading=true
|
|
|
addHalfInfo(json).then(res => {
|
|
|
- this.isDisabled = false
|
|
|
+ this.isDisabled = false
|
|
|
+ this.loading=false
|
|
|
if (res.success) {
|
|
|
console.log('保存的部分信息', halfInfo)
|
|
|
this.$message.success('保存成功')
|