|
|
@ -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); |
|
|
|