Merge remote-tracking branch 'origin/master'

jg-waiwang-pro
胡川虎 4 months ago
commit a2e1162e9f

@ -257,6 +257,24 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
} }
} }
if(isPc){ if(isPc){
if(ObjectUtil.isNotEmpty(voucherPagination.getCustomerName())){
voucherNum++;
String value = String.valueOf(voucherPagination.getCustomerName());
voucherQueryWrapper.like("h.name",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getSupplierName())){
voucherNum++;
String value = String.valueOf(voucherPagination.getSupplierName());
voucherQueryWrapper.like("h1.name",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getNetWeight())){
voucherNum++;
String value = String.valueOf(voucherPagination.getNetWeight());
voucherQueryWrapper.like("d.net_weight",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getVoucherCode())){ if(ObjectUtil.isNotEmpty(voucherPagination.getVoucherCode())){
voucherNum++; voucherNum++;

@ -77,4 +77,15 @@ public class VoucherPagination extends Pagination {
/** 销售合同号 */ /** 销售合同号 */
@JsonProperty("saleContractNo") @JsonProperty("saleContractNo")
private String saleContractNo; private String saleContractNo;
/** 客户供应商 */
@JsonProperty("customerName")
private String customerName;
/** 客户供应商 */
@JsonProperty("supplierName")
private String supplierName;
/** 结算量 */
@JsonProperty("netWeight")
private String netWeight;
} }

@ -31,16 +31,18 @@
<el-table-column prop="documentNo" label="单据编号" align="center" sortable width="200" <el-table-column prop="documentNo" label="单据编号" align="center" sortable width="200"
fixed="left"> fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="outboundNumber" label="重量" align="center" width="200">
</el-table-column>
<el-table-column prop="warehousingStorageType" label="业务类型" align="center" sortable <el-table-column prop="warehousingStorageType" label="业务类型" align="center" sortable
width="200" fixed="left"> width="200">
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="入库仓库" align="center" width="150"> <el-table-column prop="warehouseName" label="入库仓库" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="orderCode" label="关联采购单号" align="center" width="200"> <el-table-column prop="orderCode" label="关联采购单号" align="center" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="outboundNumber" label="重量" align="center" width="200">
</el-table-column>
<el-table-column prop="skuNum" label="商品数" align="center" width="200"> <el-table-column prop="skuNum" label="商品数" align="center" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="voucherNum" label="凭证数" align="center" width="200"> <el-table-column prop="voucherNum" label="凭证数" align="center" width="200">

@ -1367,7 +1367,8 @@
</el-col> </el-col>
<el-col :span="24" v-if="judgeShow('cwaccountvoucher-${html.relationField}')"> <el-col :span="24" v-if="judgeShow('cwaccountvoucher-${html.relationField}')">
<jnpf-form-tip-item label-width="0"> <jnpf-form-tip-item label-width="0">
<el-table :data="dataForm.cwaccountsummaryList" size='mini' border> <el-table :data="dataForm.cwaccountsummaryList" size='mini' show-summary
:summary-method="getSummaries"> border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" /> <el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品" v-if="judgeShow('cwaccountsummary-productId')" <el-table-column label="商品" v-if="judgeShow('cwaccountsummary-productId')"
prop="productId" align="center" width="200" fixed="left"> prop="productId" align="center" width="200" fixed="left">
@ -1929,6 +1930,9 @@ export default {
}, { }, {
"label": "归属人员", "label": "归属人员",
"value": "belongPeopleName" "value": "belongPeopleName"
}, {
"label": "所属部门",
"value": "fFullName"
}], }],
cwaccountcontractcontractIdcolumnOptions: [{ cwaccountcontractcontractIdcolumnOptions: [{
"label": "合同编码", "label": "合同编码",
@ -2244,6 +2248,40 @@ export default {
}, },
mounted() { }, mounted() { },
methods: { methods: {
getSummaries(param) {
const summaryField = ["settlementTotal"];
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
if (!summaryField.includes(column.property)) {
sums[index] = '';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return this.jnpf.floatAdd(prev, curr);
} else {
return prev;
}
}, 0);
const thousandsField = [];
if (thousandsField.includes(column.property)) {
sums[index] = thousandsFormat(sums[index]);
}
} else {
sums[index] = '';
}
});
return sums;
},
initList(list) { initList(list) {
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
const e = list[i]; const e = list[i];
@ -2988,7 +3026,7 @@ export default {
found.otherExpenses = this.jnpf.floatSub(Number(found.otherExpenses), Number(cur.otherExpenses)).toFixed(2); found.otherExpenses = this.jnpf.floatSub(Number(found.otherExpenses), Number(cur.otherExpenses)).toFixed(2);
} }
} else { } else {
acc.push({ productId: cur.productId, productName: cur.productName, spec: cur.spec, rate: cur.rate, settlementSum: cur.settlementSum, settlementTotal: cur.settlementTotal, settlementUnit: cur.unit, settlementPrice: cur.settlementPrice, settlementSubtotal: cur.settlementSubtotal, settlementPriceNo: cur.settlementPriceNo, settlementSubtotalNo: cur.settlementSubtotalNo, otherType: cur.otherType, otherExpenses: cur.otherExpenses, settlementTotal: cur.settlementTotal, settlementTotalNo: cur.settlementTotalNo, businessOrderId: cur.businessOrderId, orderNo: cur.orderNo}) acc.push({ productId: cur.productId, productName: cur.productName, spec: cur.spec, rate: cur.rate, settlementSum: cur.settlementSum, settlementTotal: cur.settlementTotal, settlementUnit: cur.unit, settlementPrice: cur.settlementPrice, settlementSubtotal: cur.settlementSubtotal, settlementPriceNo: cur.settlementPriceNo, settlementSubtotalNo: cur.settlementSubtotalNo, otherType: cur.otherType, otherExpenses: cur.otherExpenses, settlementTotal: cur.settlementTotal, settlementTotalNo: cur.settlementTotalNo, businessOrderId: cur.businessOrderId, orderNo: cur.orderNo })
} }
return acc return acc
}, []) }, [])

@ -44,6 +44,19 @@
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="供应商">
<el-input v-model="query.supplierName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结算量">
<el-input v-model="query.netWeight" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
@ -72,9 +85,7 @@
<el-button type="text" icon="icon-ym icon-ym-btn-upload" @click="handelUpload()" <el-button type="text" icon="icon-ym icon-ym-btn-upload" @click="handelUpload()"
v-has="'btn_upload'">导入 v-has="'btn_upload'">导入
</el-button> </el-button>
<!-- <el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button> -->
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="createPurchaseOrder()">生成采购单 @click="createPurchaseOrder()">生成采购单
</el-button> </el-button>
@ -84,6 +95,9 @@
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="createSaleDeliveryVoucher()">生成销售发货凭证 @click="createSaleDeliveryVoucher()">生成销售发货凭证
</el-button> </el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true"> <el-tooltip content="高级查询" placement="top" v-if="true">
@ -98,7 +112,7 @@
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column @selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column
border> show-summary :summary-method="getTableSummaries" border>
<el-table-column prop="voucherCode" label="凭证编号" align="center" width="160" fixed="left"> <el-table-column prop="voucherCode" label="凭证编号" align="center" width="160" fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="orderNo" label="订单序号" align="center" width="100" fixed="left"> <el-table-column prop="orderNo" label="订单序号" align="center" width="100" fixed="left">
@ -334,6 +348,8 @@ export default {
voucherType: undefined, voucherType: undefined,
preparationTime: undefined, preparationTime: undefined,
poundCode: undefined, poundCode: undefined,
supplierName: undefined,
netWeight: undefined,
businessType: "1", businessType: "1",
documentType: "1" documentType: "1"
}, },
@ -742,6 +758,44 @@ export default {
}) })
} }
}, },
getTableSummaries(param) {
const {
columns,
data
} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
} else if (["netWeight"].includes(column.property)) {
const values = data.map(item => {
if (column.property.includes('.')) {
const [attr1, attr2] = column.property.split('.')
return Number(item[attr1][attr2])
}
return Number(item[column.property])
});
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0).toFixed(2);
if ([].includes(column.property)) {
sums[index] = thousandsFormat(sums[index]);
}
} else {
sums[index] = '';
}
}
})
return sums;
},
getColumnList() { getColumnList() {
// //
this.columnOptions = this.transformColumnList(this.columnList) this.columnOptions = this.transformColumnList(this.columnList)
@ -922,6 +976,22 @@ export default {
}) })
return return
} }
const selectData = this.multipleSelectionItem
let isSaleFlag = true
debugger
selectData.forEach(function (item) {
if (item.isTransfer == '2') {
isSaleFlag = false
}
});
if (!isSaleFlag) {
this.$message({
type: 'error',
message: '凭证已生成销售单',
duration: 1500,
})
return
}
const ids = this.multipleSelection const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning' type: 'warning'

@ -28,6 +28,36 @@
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="采购合同编号">
<el-input v-model="query.purchaseContractNo" placeholder="请输入" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售合同编号">
<el-input v-model="query.saleContractNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="商品名称">
<el-input v-model="query.productName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户">
<el-input v-model="query.customerName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结算量">
<el-input v-model="query.netWeight" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
@ -53,9 +83,7 @@
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" <el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出 v-has="'btn_download'">导出
</el-button> </el-button>
<!-- <el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button> -->
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="createSaleOrder()">生成销售单 @click="createSaleOrder()">生成销售单
</el-button> </el-button>
@ -65,6 +93,9 @@
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="createPurchaseReceiptVoucher()">生成采购收货凭证 @click="createPurchaseReceiptVoucher()">生成采购收货凭证
</el-button> </el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true"> <el-tooltip content="高级查询" placement="top" v-if="true">
@ -79,7 +110,7 @@
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column @selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column
border> show-summary :summary-method="getTableSummaries" border>
<el-table-column prop="voucherCode" label="凭证编号" align="center" fixed="left" width="160"> <el-table-column prop="voucherCode" label="凭证编号" align="center" fixed="left" width="160">
</el-table-column> </el-table-column>
<el-table-column label="单据类型" prop="documentType1" align="center" fixed="left" <el-table-column label="单据类型" prop="documentType1" align="center" fixed="left"
@ -107,11 +138,9 @@
</el-table-column> --> </el-table-column> -->
<el-table-column prop="businessOrderNo" label="关联销售订单" align="center" width="160"> <el-table-column prop="businessOrderNo" label="关联销售订单" align="center" width="160">
</el-table-column> </el-table-column>
<el-table-column prop="voucherProductList[0].netWeight" label="结算量" align="center" <el-table-column prop="netWeight" label="结算量" align="center" width="120">
width="120">
</el-table-column> </el-table-column>
<el-table-column prop="voucherProductList[0].clearWeight" label="净重" align="center" <el-table-column prop="clearWeight" label="净重" align="center" width="120">
width="120">
</el-table-column> </el-table-column>
<el-table-column prop="customerName1" label="客户" align="center" width="200"> <el-table-column prop="customerName1" label="客户" align="center" width="200">
</el-table-column> </el-table-column>
@ -281,10 +310,14 @@ export default {
uploadBoxVisible: false, uploadBoxVisible: false,
detailVisible: false, detailVisible: false,
query: { query: {
purchaseContractNo: undefined,
saleContractNo: undefined,
voucherCode: undefined, voucherCode: undefined,
voucherType: undefined, voucherType: undefined,
preparationTime: undefined, preparationTime: undefined,
poundCode: undefined, poundCode: undefined,
customerName: undefined,
netWeight: undefined,
businessType: "2", businessType: "2",
documentType: "2" documentType: "2"
}, },
@ -645,6 +678,43 @@ export default {
}) })
} }
}, },
getTableSummaries(param) {
const {
columns,
data
} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
} else if (["netWeight"].includes(column.property)) {
const values = data.map(item => {
if (column.property.includes('.')) {
const [attr1, attr2] = column.property.split('.')
return Number(item[attr1][attr2])
}
return Number(item[column.property])
});
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0).toFixed(2);
if ([].includes(column.property)) {
sums[index] = thousandsFormat(sums[index]);
}
} else {
sums[index] = '';
}
}
})
return sums;
},
getColumnList() { getColumnList() {
// //
this.columnOptions = this.transformColumnList(this.columnList) this.columnOptions = this.transformColumnList(this.columnList)
@ -822,6 +892,22 @@ export default {
}) })
return return
} }
const selectData = this.multipleSelectionItem
let isSaleFlag = true
debugger
selectData.forEach(function (item) {
if (item.isTransfer == '2') {
isSaleFlag = false
}
});
if (!isSaleFlag) {
this.$message({
type: 'error',
message: '凭证已生成销售单',
duration: 1500,
})
return
}
const ids = this.multipleSelection const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning' type: 'warning'

Loading…
Cancel
Save