Browse Source

【nev-pc】成品发运打印单暂存

ag_report_nev
安虹睿 10 months ago
parent
commit
bbb5edc039
  1. 71
      fe/PC/src/views/finishedProductManage/deliver/FISDeliverNote-Query.vue

71
fe/PC/src/views/finishedProductManage/deliver/FISDeliverNote-Query.vue

@ -44,13 +44,20 @@
</div>
</template>
<script>
import { getPageListWip,sumPrint,getOneCustomerInfoByCode,getDetailed } from "@/api/wms-api"
import {
getPageList,
getPageListWip,
sumPrint,
getOneCustomerInfoByCode,
getDetailed
} from "@/api/wms-api"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
import { mixins } from "@/mixins/mixins"
import { initPrintAllData } from '@/mixins/printMixin'
export default {
name: "FISDeliverNote",
mixins: [
@ -125,8 +132,66 @@ export default {
}
// qty
let _totalQty= 0
this.tableDataDetails.details.forEach(item=>{ _totalQty += Number(item.qty) })
this.tableDataDetails.details.forEach(item=>{item.totalQty = _totalQty})
// itemcodes
let _itemCodes = []
this.tableDataDetails.details.forEach(item=>{
_totalQty += Number(item.qty)
_itemCodes.push(item.itemCode)
})
//
let price_params = {
condition: {
filters: [
{
logic: "And",
column: "itemCode",
action: "In",
value: JSON.stringify(_itemCodes)
}
]
},
Sorting: "",
SkipCount: 0,
MaxResultCount: 20
}
let priceInfo = await getPageList(price_params,"basedata/sale-price-sheet");
//
let customer_params = {
condition: {
filters: [
{
logic: "And",
column: "code",
action: "==",
value: this.propsData.customerCode
}
]
},
Sorting: "",
SkipCount: 0,
MaxResultCount: 20
}
let customerInfo = await getPageList(customer_params,"basedata/customer");
this.tableDataDetails.details.forEach(item=>{
item.totalQty = _totalQty
//
if(customerInfo && customerInfo.items && customerInfo.items.length > 0){
item.customerFax = customerInfo.items[0].fax
item.customerName = customerInfo.items[0].name
item.customerShortName = customerInfo.items[0].shortName
item.customerPhone = customerInfo.items[0].phone
}
//
if(priceInfo && priceInfo.items && priceInfo.items.length > 0){
let _priceObj = {}
priceInfo.items.forEach(priceitem=>{ _priceObj[priceitem.itemCode] = priceitem })
item.price = _priceObj[item.itemCode].salePrice
item.rowTotal = (item.qty * item.price).toFixed(6)
}
})
let _alltotal = 0
this.tableDataDetails.details.forEach(item=>{ _alltotal += Number(item.rowTotal) })
this.tableDataDetails.details.forEach(item=>{ item.alltotal = _alltotal})
// let data = await initPrintAllData(this.tableDataDetails,'chdmxb.rdlx',false,_option);
// todo:
let data = await initPrintAllData(this.tableDataDetails,'fhd.rdlx',false,_option);

Loading…
Cancel
Save