|
|
@ -216,7 +216,6 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">抬头</div> |
|
|
|
|
|
|
|
<el-form-item> <el-input v-model="from.four.rise" placeholder="" clearable |
|
|
|
class="addinputInfo addinputw" /></el-form-item> |
|
|
|
</el-col> |
|
|
@ -224,8 +223,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">开票总金额</div> |
|
|
|
<el-form-item> <el-input v-model="totalQuantity" :readonly="true" placeholder="" clearable |
|
|
|
class="addinputInfo addinputw" /></el-form-item> |
|
|
|
<el-form-item> <el-input v-model="from.four.totalAmount" :readonly="true" placeholder="" |
|
|
|
clearable class="addinputInfo addinputw" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">税号</div> |
|
|
@ -242,7 +241,7 @@ |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty">内容类型</div> |
|
|
|
<el-form-item> <el-radio-group v-model="from.four.contentType" size="small" |
|
|
|
class="addinputInfo addinputw"> |
|
|
|
class="addinputInfo addinputw" @change="radiogroupChange"> |
|
|
|
<el-radio :label="'1'">发票商品</el-radio> |
|
|
|
<el-radio :label="'2'">自定义明细</el-radio> |
|
|
|
</el-radio-group></el-form-item> |
|
|
@ -345,7 +344,7 @@ |
|
|
|
<el-table-column label="分配数量" align="center" min-width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.count" clearable placeholder="" |
|
|
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
|
oninput="value=value.replace(/^0+(\d)|[^\d]+/g,'')" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -824,6 +823,7 @@ |
|
|
|
this.from.four.invoiceTypeValue = choose[0].dictValue |
|
|
|
}, |
|
|
|
saveInvoice() { |
|
|
|
this.from.four.billSid = this.rowItemSid |
|
|
|
req.saveOrderInvoive(this.from.four).then((resp) => { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
@ -839,17 +839,55 @@ |
|
|
|
}, |
|
|
|
handleClose() { |
|
|
|
this.dialogVisible = false |
|
|
|
this.$refs.main.clearSelection() |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
console.log("val", val); |
|
|
|
this.goodsList = val |
|
|
|
}, |
|
|
|
radiogroupChange(val) { |
|
|
|
console.log("val", val); |
|
|
|
|
|
|
|
let quantity = 0 |
|
|
|
if (this.from.first.length > 0) { |
|
|
|
this.from.first.forEach((e) => { |
|
|
|
quantity += Number(e.salesAmount) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.from.four.totalAmount = quantity |
|
|
|
|
|
|
|
if (val == '1') { |
|
|
|
this.from.four.detailsList = this.from.first |
|
|
|
} else { |
|
|
|
this.from.four.detailsList = [] |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
saveData() { |
|
|
|
this.from.four.detailsList = this.goodsList |
|
|
|
this.dialogVisible = false |
|
|
|
this.$refs.main.clearSelection() |
|
|
|
|
|
|
|
let quantity = 0 |
|
|
|
if (this.from.four.detailsList.length > 0) { |
|
|
|
this.from.four.detailsList.forEach((e) => { |
|
|
|
quantity += Number(e.salesAmount) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.from.four.totalAmount = quantity |
|
|
|
}, |
|
|
|
delGoods(index) { |
|
|
|
this.from.four.detailsList.splice(index, 1) |
|
|
|
let quantity = 0 |
|
|
|
if (this.from.four.detailsList.length > 0) { |
|
|
|
this.from.four.detailsList.forEach((e) => { |
|
|
|
quantity += Number(e.salesAmount) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.from.four.totalAmount = quantity |
|
|
|
}, |
|
|
|
selectCarrier(row, val) { |
|
|
|
console.log("selectCarrier", val); |
|
|
@ -926,23 +964,20 @@ |
|
|
|
|
|
|
|
var item = this.goodsStockList[i] |
|
|
|
|
|
|
|
if (Number(item.count) > 0) { |
|
|
|
|
|
|
|
goodsStocks.push({ |
|
|
|
"sid": item.locationSid, |
|
|
|
"sourceBillSid": this.rowItemSid, |
|
|
|
"goodsSkuSid": item.goodsSkuSid, |
|
|
|
"goodsSpuName": item.goodsSpuName, |
|
|
|
"goodsSpuTitle": "", |
|
|
|
"goodsSkuCode": '', |
|
|
|
"count": item.count, |
|
|
|
"rackSid": item.rackSid, |
|
|
|
"rackCode": item.rackCode, |
|
|
|
"inventorySid": item.inventorySid, |
|
|
|
"initialCount": item.initialCount, |
|
|
|
"locationSid": item.locationSid, |
|
|
|
}) |
|
|
|
} |
|
|
|
goodsStocks.push({ |
|
|
|
"sid": item.locationSid, |
|
|
|
"sourceBillSid": this.rowItemSid, |
|
|
|
"goodsSkuSid": item.goodsSkuSid, |
|
|
|
"goodsSpuName": item.goodsSpuName, |
|
|
|
"goodsSpuTitle": "", |
|
|
|
"goodsSkuCode": '', |
|
|
|
"count": item.count, |
|
|
|
"rackSid": item.rackSid, |
|
|
|
"rackCode": item.rackCode, |
|
|
|
"inventorySid": item.inventorySid, |
|
|
|
"initialCount": item.initialCount, |
|
|
|
"locationSid": item.locationSid, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
req.saveSelAvailable(goodsStocks).then((res) => { |
|
|
|