编辑页信息查询

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

@ -134,6 +134,20 @@
<result column="storageNum" property="storageNum"/> <result column="storageNum" property="storageNum"/>
</resultMap> </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 id="querySaleContract" resultMap="contractList">
SELECT SELECT
a.*, a.*,
@ -269,5 +283,18 @@
</select> </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> </mapper>

@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.entity.ContractLEntity; import jnpf.entity.ContractLEntity;
import jnpf.model.bom.BomPagination; import jnpf.model.bom.BomPagination;
import jnpf.model.businessorder.BusinessOrderPagination; import jnpf.model.businessorder.BusinessOrderPagination;
import jnpf.model.businessorder.ContractModel;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; 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); 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> getPurchaseList(BusinessOrderPagination businessOrderPagination);
List<BusinessOrderEntity> getPurchaseTypeList(BusinessOrderPagination businessOrderPagination,String dataType); 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 @Override
public BusinessOrderEntity getInfo(String id){ public BusinessOrderEntity getInfo(String id){
QueryWrapper<BusinessOrderEntity> queryWrapper=new QueryWrapper<>(); QueryWrapper<BusinessOrderEntity> queryWrapper=new QueryWrapper<>();

@ -609,6 +609,10 @@ public class BusinessOrderController {
if(entity==null){ if(entity==null){
return ActionResult.fail("表单数据不存在!"); 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); Map<String, Object> businessOrderMap=JsonUtil.entityToMap(entity);
businessOrderMap.put("id", businessOrderMap.get("id")); businessOrderMap.put("id", businessOrderMap.get("id"));
//副表数据 //副表数据

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

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

@ -387,6 +387,38 @@ export default {
}) })
}, },
methods: { 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) { toDetail(defaultValue, modelId) {
if (!defaultValue) return if (!defaultValue) return
getConfigData(modelId).then(res => { getConfigData(modelId).then(res => {
@ -729,38 +761,6 @@ export default {
this.$refs.FlowBox.init(data) 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) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false
if (isrRefresh) this.reset() if (isrRefresh) this.reset()

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

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

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

Loading…
Cancel
Save