编辑页信息查询

jg-waiwang-pro
vayne 8 months ago
parent 93e97f1510
commit e88629b779

@ -133,6 +133,20 @@
<result column="contractName" property="contractName"/>
<result column="storageNum" property="storageNum"/>
</resultMap>
<resultMap id="contractInfo" type="jnpf.model.businessorder.ContractModel">
<result column="contractName" property="contractName"></result>
<result column="contractPeriodTime" property="contractPeriodTime"></result>
<result column="currency" property="currency"></result>
<result column="procurementModel" property="procurementModel"></result>
<result column="pricingModel" property="pricingModel"></result>
<result column="subject2" property="subject2"></result>
<result column="secondCustomName" property="secondCustomName"></result>
<result column="deliveryTime" property="deliveryTime"></result>
<result column="deliveryModel" property="deliveryModel"></result>
<result column="modeTransport" property="modeTransport"></result>
<result column="costBearingMian" property="costBearingMian"></result>
</resultMap>
<select id="querySaleContract" resultMap="contractList">
SELECT
@ -269,5 +283,18 @@
</select>
<select id="queryContractInfo" resultMap="contractInfo">
SELECT
a.*,
b.contract_name as contractName,
c.name as secondCustomName
FROM
jg_contract a
LEFT JOIN jg_contract b ON a.related_contract_id = a.id and b.f_delete_mark is null
LEFT JOIN jg_subject_basic c ON a.subject2 = c.id and c.f_delete_mark is null
WHERE a.f_delete_mark is null
AND a.id = #{id}
</select>
</mapper>

@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.entity.ContractLEntity;
import jnpf.model.bom.BomPagination;
import jnpf.model.businessorder.BusinessOrderPagination;
import jnpf.model.businessorder.ContractModel;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -34,4 +35,6 @@ public interface BusinessOrderMapper extends BaseMapper<BusinessOrderEntity> {
IPage<BusinessOrderEntity> querySaleOrder(@Param("page") Page<BusinessOrderEntity> page, @Param("businessOrderPagination") BusinessOrderPagination businessOrderPagination, @Param("ew") QueryWrapper<BusinessOrderEntity> businessOrderQueryWrapper);
List<ContractModel> queryContractInfo(String id);
}

@ -51,5 +51,7 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
List<BusinessOrderEntity> getPurchaseList(BusinessOrderPagination businessOrderPagination);
List<BusinessOrderEntity> getPurchaseTypeList(BusinessOrderPagination businessOrderPagination,String dataType);
// 查询采购/销售的合同详情
List<ContractModel> queryContractInfo(String id);
}

@ -798,6 +798,11 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
}
}
@Override
public List<ContractModel> queryContractInfo(String id) {
return businessOrderMapper.queryContractInfo(id);
}
@Override
public BusinessOrderEntity getInfo(String id){
QueryWrapper<BusinessOrderEntity> queryWrapper=new QueryWrapper<>();

@ -609,6 +609,10 @@ public class BusinessOrderController {
if(entity==null){
return ActionResult.fail("表单数据不存在!");
}
if (StringUtil.isNotEmpty(entity.getContractId())) {
List<ContractModel> contractInfo = businessOrderService.queryContractInfo(entity.getContractId());
entity.setContractInfoList(contractInfo);
}
Map<String, Object> businessOrderMap=JsonUtil.entityToMap(entity);
businessOrderMap.put("id", businessOrderMap.get("id"));
//副表数据

@ -1,6 +1,7 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import jnpf.model.businessorder.ContractModel;
import lombok.Data;
import java.util.Date;
import java.util.List;
@ -149,6 +150,8 @@ public class BusinessOrderEntity {
@TableField(exist = false)
private String storageNum;
@TableField(exist = false)
private List<ContractModel> contractInfoList;
@TableField(exist = false)
private List<SettlementInfoEntity> settlementInfoList;
@TableField(exist = false)
private List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList;

@ -40,6 +40,9 @@ public class ContractModel {
/** 关联客户(二级) **/
@JSONField(name = "subject2")
private String subject2;
/** 关联客户名称(二级) **/
@JSONField(name = "secondCustomName")
private String secondCustomName;
/** 交货时间开始 **/
@JSONField(name = "deliveryTime")
private Long deliveryTime;

@ -387,6 +387,38 @@ export default {
})
},
methods: {
addSaleHandle() {
if (!this.multipleSelectionItem.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const selectData = this.multipleSelectionItem
if (!this.saleFlowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.saleFlowList.length === 1) {
this.selectSaleFlow(this.saleFlowList[0], selectData)
} else {
this.flowListVisible = true
}
},
selectSaleFlow(item, selectData) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1',
selectData: selectData
}
this.flowListVisible = false
this.saleFlowVisible = true
this.$nextTick(() => {
this.$refs.SaleFlowBox.init(data)
})
},
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
@ -672,7 +704,7 @@ export default {
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
})
},
search() {
this.listQuery.currentPage = 1
@ -686,7 +718,7 @@ export default {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
@ -729,38 +761,6 @@ export default {
this.$refs.FlowBox.init(data)
})
},
addSaleHandle() {
if (!this.multipleSelectionItem.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const selectData = this.multipleSelectionItem
if (!this.saleFlowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.saleFlowList.length === 1) {
this.selectSaleFlow(this.saleFlowList[0], selectData)
} else {
this.flowListVisible = true
}
},
selectSaleFlow(item, selectData) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1',
selectData: selectData
}
this.flowListVisible = false
this.saleFlowVisible = true
this.$nextTick(() => {
this.$refs.SaleFlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()

@ -111,7 +111,7 @@
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-table :data="dataForm.contractList" size='mini'>
<el-table :data="dataForm.contractInfoList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="合同名称" v-if="judgeShow('businessorderproductrelational-tax')"
prop="tax">
@ -1548,7 +1548,7 @@ export default {
const _data = this.dataList()
return _data
},
initPurchaseData(){
initPurchaseData() {
console.log("55555555", this.setting)
},
selfInit() {
@ -1809,6 +1809,9 @@ export default {
for (let i = 0; i < _dataAll.businessOrderProductRelationalList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.contractInfoList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},

@ -503,6 +503,7 @@ export default {
},
getBeforeInfo(data) {
debugger
FlowBeforeInfo(data.id || 0, { taskNodeId: data.taskNodeId, taskOperatorId: data.taskId, flowId: data.flowId }).then(res => {
if (res.data.flowFormInfo.urlAddress == 'extend/customer/subjectfollowmanagement/form.vue') {
res.data.flowFormInfo.urlAddress = 'extend/customer/subjectfollowmanagement/report.vue'

@ -483,6 +483,7 @@ export default {
this.$emit('close', isRefresh)
},
init(data) {
debugger
this.loading = true
this.activeTab = '0'
this.setting = data
@ -504,13 +505,14 @@ export default {
},
getBeforeInfo(data) {
FlowBeforeInfo(data.id || 0, { taskNodeId: data.taskNodeId, taskOperatorId: data.taskId, flowId: data.flowId }).then(res => {
if (res.data.flowFormInfo.urlAddress == 'extend/customer/subjectfollowmanagement/form.vue') {
res.data.flowFormInfo.urlAddress = 'extend/customer/subjectfollowmanagement/report.vue'
} else if (res.data.flowFormInfo.urlAddress == 'extend/supplier/subjectfollowmanagement/form.vue') {
res.data.flowFormInfo.urlAddress = 'extend/supplier/subjectfollowmanagement/report.vue'
} else if (res.data.flowFormInfo.urlAddress == 'extend/service/subjectfollowmanagement/form.vue') {
res.data.flowFormInfo.urlAddress = 'extend/service/subjectfollowmanagement/report.vue'
}
debugger
// if (res.data.flowFormInfo.urlAddress == 'extend/customer/subjectfollowmanagement/form.vue') {
// res.data.flowFormInfo.urlAddress = 'extend/customer/subjectfollowmanagement/report.vue'
// } else if (res.data.flowFormInfo.urlAddress == 'extend/supplier/subjectfollowmanagement/form.vue') {
// res.data.flowFormInfo.urlAddress = 'extend/supplier/subjectfollowmanagement/report.vue'
// } else if (res.data.flowFormInfo.urlAddress == 'extend/service/subjectfollowmanagement/form.vue') {
// res.data.flowFormInfo.urlAddress = 'extend/service/subjectfollowmanagement/report.vue'
// }
this.flowFormInfo = res.data.flowFormInfo
this.flowTaskInfo = res.data.flowTaskInfo || {}
this.flowTemplateInfo = res.data.flowTemplateInfo

Loading…
Cancel
Save