按钮修改

jg-waiwang-pro
vayne 6 months ago
parent 8090c7d05a
commit beccb6ca0f

@ -237,7 +237,6 @@
<select id="querySaleContract" resultMap="contractList"> <select id="querySaleContract" resultMap="contractList">
SELECT SELECT
a.*, a.*,
b.id as firstCustomId,
b.name AS firstCustomName, b.name AS firstCustomName,
c.f_full_name AS enterpriseName, c.f_full_name AS enterpriseName,
d.contract_name AS relatedContractName, d.contract_name AS relatedContractName,
@ -266,7 +265,6 @@
<select id="queryPurchaseContract" resultMap="contractList"> <select id="queryPurchaseContract" resultMap="contractList">
SELECT SELECT
a.*, a.*,
b.id as firstSupplyId,
b.name AS firstSupplyName, b.name AS firstSupplyName,
c.f_full_name AS enterpriseName, c.f_full_name AS enterpriseName,
d.contract_name AS relatedContractName, d.contract_name AS relatedContractName,

@ -56,15 +56,10 @@
END AS receiptType1, END AS receiptType1,
CASE CASE
a.receipt_status a.receipt_status
when '1' then '待校验' when '1' then '待提交'
when '2' then '待审核' when '2' then '待审核'
when '3' then '待处理' when '3' then '已完成'
when '4' then '待执行' when '4' then '已关闭'
when '5' then '执行中'
when '6' then '已完成'
when '7' then '校验失败'
when '8' then '已取消'
when '9' then '已驳回'
END AS receiptStatus1, END AS receiptStatus1,
b.return_cargo_code AS returnCargoOrder, b.return_cargo_code AS returnCargoOrder,
c.name AS receiptWarehouse, c.name AS receiptWarehouse,

@ -1049,12 +1049,17 @@ public class BusinessOrderController {
* *
* @return * @return
*/ */
@Operation(summary = "获取采购合同列表(携带商品ids)") @Operation(summary = "获取采购/销售合同列表(携带商品ids)")
@PostMapping("/contract/getPurchaseContractList") @PostMapping("/contract/getPurchaseContractList")
public ActionResult list4(@RequestBody BusinessOrderPagination businessOrderPagination)throws IOException{ public ActionResult list4(@RequestBody BusinessOrderPagination businessOrderPagination)throws IOException{
List<String> productIds = businessOrderPagination.getProductIds(); List<String> productIds = businessOrderPagination.getProductIds();
List<ContractLEntity> contractList = new ArrayList<>(); List<ContractLEntity> contractList = new ArrayList<>();
List<ContractLEntity> list= businessOrderService.queryPurchaseContractInfo(businessOrderPagination.getBusinessLineId()); List<ContractLEntity> list = new ArrayList<>();
if (StringUtils.isNotEmpty(businessOrderPagination.getContractType()) && businessOrderPagination.getContractType().equals("1")) {
list = businessOrderService.queryPurchaseContractInfo(businessOrderPagination.getBusinessLineId());
}else {
list = businessOrderService.querySaleContractInfo(businessOrderPagination.getBusinessLineId());
}
for (ContractLEntity entity : list){ for (ContractLEntity entity : list){
List<String> productByContract = new ArrayList<>(); List<String> productByContract = new ArrayList<>();
List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId()); List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId());
@ -1068,7 +1073,7 @@ public class BusinessOrderController {
} }
entity.setProductByContractModelList(productByContractModelList); entity.setProductByContractModelList(productByContractModelList);
QueryWrapper<SubjectbasicEntity> subjectQueryWrapper = new QueryWrapper<>(); QueryWrapper<SubjectbasicEntity> subjectQueryWrapper = new QueryWrapper<>();
subjectQueryWrapper.lambda().eq(SubjectbasicEntity::getId,entity.getFirstSupplyId()); subjectQueryWrapper.lambda().eq(SubjectbasicEntity::getId,entity.getSubject());
List<SubjectbasicEntity> subjectbasicEntityList = subjectbasicService.list(subjectQueryWrapper); List<SubjectbasicEntity> subjectbasicEntityList = subjectbasicService.list(subjectQueryWrapper);
entity.setSubjectbasicEntityList(subjectbasicEntityList); entity.setSubjectbasicEntityList(subjectbasicEntityList);
} }

@ -63,4 +63,7 @@ public class BusinessOrderPagination extends Pagination {
/** 商品idList */ /** 商品idList */
@JsonProperty("productIds") @JsonProperty("productIds")
private List<String> productIds; private List<String> productIds;
/** 合同类型 */
@JsonProperty("contractType")
private String contractType;
} }

@ -64,12 +64,16 @@ export default {
}, },
excludeIdList: [], excludeIdList: [],
businessLineId: '', businessLineId: '',
contractType: '',
productIds: [], productIds: [],
checked: [] checked: []
} }
}, },
methods: { methods: {
init(businessLineId, productIds) { init(businessLineId, productIds, contractType) {
if (contractType && typeof (contractType) == 'string') {
this.contractType = contractType;
}
if (businessLineId && typeof (businessLineId) == 'string') { if (businessLineId && typeof (businessLineId) == 'string') {
this.businessLineId = businessLineId; this.businessLineId = businessLineId;
} }
@ -82,7 +86,8 @@ export default {
...this.listQuery, ...this.listQuery,
keyword: this.keyword, keyword: this.keyword,
businessLineId: this.businessLineId, businessLineId: this.businessLineId,
productIds: this.productIds productIds: this.productIds,
contractType: this.contractType
} }
request({ request({
url: `/api/scm/BusinessOrder/contract/getPurchaseContractList`, url: `/api/scm/BusinessOrder/contract/getPurchaseContractList`,

@ -1775,9 +1775,10 @@ export default {
this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
}, },
contractInfo2() { contractInfo2() {
let contractType = '1'//
this.ContractBoxVisible = true this.ContractBoxVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ContractBox.init(this.dataForm.businessLineId, this.productIds) this.$refs.ContractBox.init(this.dataForm.businessLineId, this.productIds, contractType)
}) })
}, },
contractList(list) { contractList(list) {
@ -1870,6 +1871,7 @@ export default {
if (data.flag == '采购收货凭证生成采购单') { if (data.flag == '采购收货凭证生成采购单') {
this.productCreate = true this.productCreate = true
this.dataForm.orderType = '3' this.dataForm.orderType = '3'
this.dataForm.deliveryType = '2'
this.dataForm.firstSubjectBasicId = data[0].supplierId this.dataForm.firstSubjectBasicId = data[0].supplierId
this.dataForm.enterpriseId = data[0].customerId this.dataForm.enterpriseId = data[0].customerId
var voucherIdList = { var voucherIdList = {
@ -2020,6 +2022,15 @@ export default {
isOk = false isOk = false
break break
} }
if (!e.businessPrice) {
this.$message({
message: '采购单价不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
} }
return isOk; return isOk;
}, },

@ -366,8 +366,10 @@ export default {
const selectData = this.multipleSelectionItem const selectData = this.multipleSelectionItem
let stateFlag = true; let stateFlag = true;
const customId = selectData[0].customerId; const customId = selectData[0].customerId;
const deliveryType = selectData[0].deliveryType;
let customerIdFlag = true; let customerIdFlag = true;
let purchaseFlag = true; let purchaseFlag = true;
let deliveryFlag = true;
selectData.forEach(function (item) { selectData.forEach(function (item) {
if (item.flowState != 2) { if (item.flowState != 2) {
stateFlag = false; stateFlag = false;
@ -378,6 +380,9 @@ export default {
if (item.isTransfer != '1') { if (item.isTransfer != '1') {
purchaseFlag = false; purchaseFlag = false;
} }
if (item.deliveryType != deliveryType) {
deliveryFlag = false;
}
}); });
if (!stateFlag) { if (!stateFlag) {
this.$message({ this.$message({
@ -395,6 +400,14 @@ export default {
}) })
return return
} }
if (!deliveryFlag) {
this.$message({
type: 'error',
message: '凭证配送方式不一致',
duration: 1500,
})
return
}
if (!purchaseFlag) { if (!purchaseFlag) {
this.$message({ this.$message({
type: 'error', type: 'error',

@ -1639,12 +1639,14 @@ export default {
this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
}, },
contractInfo2() { contractInfo2() {
let contractType = '2' //
this.ContractBoxVisible = true this.ContractBoxVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ContractBox.init(this.dataForm.businessLineId, this.productIds) this.$refs.ContractBox.init(this.dataForm.businessLineId, this.productIds, contractType)
}) })
}, },
contractList(list) { contractList(list) {
debugger
let e = list let e = list
this.dataForm.contractId = e.id this.dataForm.contractId = e.id
this.dataForm.contractName = e.contractName this.dataForm.contractName = e.contractName
@ -1662,7 +1664,7 @@ export default {
this.dataForm.transactionMode = e.deliveryModel this.dataForm.transactionMode = e.deliveryModel
this.dataForm.deliveryAddress = e.deliveryLocation this.dataForm.deliveryAddress = e.deliveryLocation
e.subjectbasicEntityList[0].subjectBasicId = e.subjectbasicEntityList[0].id e.subjectbasicEntityList[0].subjectBasicId = e.subjectbasicEntityList[0].id
e.subjectbasicEntityList[0].businessType = '1' e.subjectbasicEntityList[0].businessType = '2'
this.dataForm.settlementInfoList = e.subjectbasicEntityList this.dataForm.settlementInfoList = e.subjectbasicEntityList
const subjectInfo = e.subjectbasicEntityList[0] const subjectInfo = e.subjectbasicEntityList[0]
if (subjectInfo.underpaymentMethod == 0) { if (subjectInfo.underpaymentMethod == 0) {
@ -1886,6 +1888,15 @@ export default {
isOk = false isOk = false
break break
} }
if (!e.businessPrice) {
this.$message({
message: '销售单价不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
} }
return isOk; return isOk;
}, },

Loading…
Cancel
Save