客户供应商服务商财务数据权限

jg-waiwang-pro
胡川虎 6 months ago
parent fb3d17d46f
commit affcc6dbc1

@ -16,25 +16,26 @@
WHERE t1.f_delete_mark IS NULL AND t1.id = #{id} WHERE t1.f_delete_mark IS NULL AND t1.id = #{id}
</select> </select>
<select id="queryByKeyword" resultType="jnpf.entity.WarehousingStorageEntity"> <select id="queryByKeywordCaigou" resultType="jnpf.entity.WarehousingStorageEntity">
SELECT a.id storageId, SELECT a.id storageId,
a.document_no documentNo, a.document_no documentNo,
a.warehousing_id warehousingId, a.warehousing_id warehousingId,
a.warehouse_id warehouseId, a.warehouse_id warehouseId,
a.warehousing_time warehousingTime, a.warehousing_time warehousingTime,
d.code orderCode, d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 3 THEN '退供出库' WHEN 12 THEN '销售发货单出库' WHEN 9 THEN '库存初始化' END warehousingStorageType, case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 3 THEN '退货入库' WHEN 11 THEN '库存初始化' WHEN 15 THEN '采购收货单入库' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_outbound a from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
LEFT JOIN jg_business_order d ON c.business_id = d.id LEFT JOIN jg_business_order d ON c.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment} LEFT JOIN jg_business_line e ON a.warehouse_id = e.id
and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) ${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type in (1,3,12,9) and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type in (1,3,11,15)
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
<foreach item="item" index="index" collection="warehousingStoragePagination.excludeIdList" <foreach item="item" index="index" collection="warehousingStoragePagination.excludeIdList"
@ -42,25 +43,28 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
UNION ALL </select>
<select id="queryByKeywordXiaoshou" resultType="jnpf.entity.WarehousingStorageEntity">
SELECT a.id storageId, SELECT a.id storageId,
a.document_no documentNo, a.document_no documentNo,
a.warehousing_id warehousingId, a.warehousing_id warehousingId,
a.warehouse_id warehouseId, a.warehouse_id warehouseId,
a.warehousing_time warehousingTime, a.warehousing_time warehousingTime,
d.code orderCode, d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum, (SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum, (SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum,
a.f_creator_time storageTime, a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 3 THEN '退货入库' WHEN 11 THEN '库存初始化' WHEN 15 THEN '采购收货单入库' END warehousingStorageType, case a.warehousing_outbound_type WHEN 1 THEN '销售出库' WHEN 3 THEN '退供出库' WHEN 12 THEN '销售发货单出库' WHEN 9 THEN '库存初始化' END warehousingStorageType,
e.name warehouseName e.name warehouseName
from jg_warehousing_storage a from jg_warehousing_outbound a
LEFT JOIN flow_task b on a.id = b.f_process_id LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
LEFT JOIN jg_business_order d ON c.business_id = d.id LEFT JOIN jg_business_order d ON c.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id LEFT JOIN jg_business_line e ON a.warehouse_id = e.id ${ew.customSqlSegment}
${ew.customSqlSegment} and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null) and a.f_delete_mark is null and a.document_no not in (SELECT document_no from jg_cw_account_storage where f_delete_mark is null)
and (b.f_status = '2' OR b.f_status is null) and a.warehousing_storage_type in (1,3,11,15) and (b.f_status = '2' OR b.f_status is null) and a.warehousing_outbound_type in (1,3,12,9)
and d.first_subject_basic_id = #{warehousingStoragePagination.subjectId} and d.contract_id = #{warehousingStoragePagination.contractId}
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0"> <if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
and a.id not in and a.id not in
<foreach item="item" index="index" collection="warehousingStoragePagination.excludeIdList" <foreach item="item" index="index" collection="warehousingStoragePagination.excludeIdList"

@ -25,9 +25,12 @@ public interface WarehousingStorageMapper extends BaseMapper<WarehousingStorageE
//关联采购单号 //关联采购单号
String queryPurchaseNo(String id); String queryPurchaseNo(String id);
IPage<WarehousingStorageEntity> queryByKeyword(@Param("page") Page<WarehousingStorageEntity> page, @Param("warehousingStoragePagination") WarehousingStoragePagination warehousingStoragePagination, @Param("ew") QueryWrapper<WarehousingStorageEntity> warehousingStorageQueryWrapper); IPage<WarehousingStorageEntity> queryByKeywordCaigou(@Param("page") Page<WarehousingStorageEntity> page, @Param("warehousingStoragePagination") WarehousingStoragePagination warehousingStoragePagination, @Param("ew") QueryWrapper<WarehousingStorageEntity> warehousingStorageQueryWrapper);
IPage<WarehousingStorageEntity> queryByKeywordXiaoshou(@Param("page") Page<WarehousingStorageEntity> page, @Param("warehousingStoragePagination") WarehousingStoragePagination warehousingStoragePagination, @Param("ew") QueryWrapper<WarehousingStorageEntity> warehousingStorageQueryWrapper);
BigDecimal queryCurrentDayNum(@Param("warehousingStorage") WarehousingStorageEntity warehousingStorage); BigDecimal queryCurrentDayNum(@Param("warehousingStorage") WarehousingStorageEntity warehousingStorage);
BigDecimal queryCurrentDayNum2(@Param("warehousingStorage") WarehousingStorageEntity warehousingStorage); BigDecimal queryCurrentDayNum2(@Param("warehousingStorage") WarehousingStorageEntity warehousingStorage);
} }

@ -1077,7 +1077,13 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
warehousingStorageQueryWrapper.like("a.organize_json_id",organize); warehousingStorageQueryWrapper.like("a.organize_json_id",organize);
} }
warehousingStorageQueryWrapper.isNull("a.f_delete_mark"); warehousingStorageQueryWrapper.isNull("a.f_delete_mark");
IPage<WarehousingStorageEntity> userIPage = warehousingStorageMapper.queryByKeyword(page, warehousingStoragePagination, warehousingStorageQueryWrapper); IPage<WarehousingStorageEntity> userIPage;
if(StringUtil.equals(warehousingStoragePagination.getType(), "1")){
userIPage = warehousingStorageMapper.queryByKeywordCaigou(page, warehousingStoragePagination, warehousingStorageQueryWrapper);
}else{
userIPage = warehousingStorageMapper.queryByKeywordXiaoshou(page, warehousingStoragePagination, warehousingStorageQueryWrapper);
}
return warehousingStoragePagination.setData(userIPage.getRecords(),userIPage.getTotal()); return warehousingStoragePagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{

@ -52,4 +52,7 @@ public class WarehousingStoragePagination extends Pagination {
private List<String> storageIdList; private List<String> storageIdList;
@JsonProperty("outboundIdList") @JsonProperty("outboundIdList")
private List<String> outboundIdList; private List<String> outboundIdList;
private String subjectId;
private String contractId;
private String type;
} }

@ -67,20 +67,35 @@ export default {
sidx: "", sidx: "",
}, },
excludeIdList: [], excludeIdList: [],
subjectId: '',
contractId: '',
type: '',
checked: [] checked: []
} }
}, },
methods: { methods: {
init(excludeIdList) { init(excludeIdList, subjectId, contractId, type) {
this.visible = true this.visible = true
this.listLoading = true this.listLoading = true
if (excludeIdList && excludeIdList instanceof Array) { if (excludeIdList && excludeIdList instanceof Array) {
this.excludeIdList = excludeIdList; this.excludeIdList = excludeIdList;
} }
if (subjectId && typeof(subjectId) == 'string') {
this.subjectId = subjectId;
}
if (contractId && typeof(contractId) == 'string') {
this.contractId = contractId;
}
if (type && typeof(type) == 'string') {
this.type = type;
}
let query = { let query = {
...this.listQuery, ...this.listQuery,
keyword: this.keyword, keyword: this.keyword,
excludeIdList: this.excludeIdList, excludeIdList: this.excludeIdList,
subjectId: this.subjectId,
contractId: this.contractId,
type: this.type,
dataType: 0, dataType: 0,
} }
/* GoodsList(query).then(res => { /* GoodsList(query).then(res => {

@ -1724,9 +1724,6 @@
}, { }, {
"fullName": "销售对账", "fullName": "销售对账",
"id": "2" "id": "2"
}, {
"fullName": "其他对账",
"id": "3"
}], }],
typeProps: { typeProps: {
"label": "fullName", "label": "fullName",
@ -2075,7 +2072,6 @@
this.dataForm.contractType = ''; this.dataForm.contractType = '';
}, },
contractChangeData(model, row){ contractChangeData(model, row){
debugger
this.dataForm.cwaccountcontractList[0].contractName = row.contract_name this.dataForm.cwaccountcontractList[0].contractName = row.contract_name
this.dataForm.cwaccountcontractList[0].contractPeriodTime = row.contract_period_time ? row.contract_period_time.substring(0, 10) : ''; this.dataForm.cwaccountcontractList[0].contractPeriodTime = row.contract_period_time ? row.contract_period_time.substring(0, 10) : '';
this.dataForm.cwaccountcontractList[0].contractPeriodTimeEnd = row.contract_period_time_end ? row.contract_period_time_end.substring(0, 10) : ''; this.dataForm.cwaccountcontractList[0].contractPeriodTimeEnd = row.contract_period_time_end ? row.contract_period_time_end.substring(0, 10) : '';
@ -2539,13 +2535,29 @@
this.childIndex = -1 this.childIndex = -1
}, },
choice() { choice() {
if(!this.dataForm.cwaccountsubjectList[0] || this.dataForm.cwaccountsubjectList[0].subjectId == ''){
this.$message({
type: 'error',
message: '请先选择供应商/客户/服务商信息',
duration: 1500,
})
return
}
if(!this.dataForm.cwaccountcontractList[0] || this.dataForm.cwaccountcontractList[0].contractId == ''){
this.$message({
type: 'error',
message: '请先选择合同信息',
duration: 1500,
})
return
}
this.goodsBoxVisible = true this.goodsBoxVisible = true
let excludeIdList = []; let excludeIdList = [];
for (let i = 0; i < this.dataForm.cwaccountstorageList.length; i++) { for (let i = 0; i < this.dataForm.cwaccountstorageList.length; i++) {
excludeIdList.push(this.dataForm.cwaccountstorageList[i].storageId); excludeIdList.push(this.dataForm.cwaccountstorageList[i].storageId);
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.goodsBox.init(excludeIdList) this.$refs.goodsBox.init(excludeIdList, this.dataForm.cwaccountsubjectList[0].subjectId, this.dataForm.cwaccountcontractList[0].contractId, this.dataForm.type)
}) })
}, },
delcwaccountstorageList(index) { delcwaccountstorageList(index) {

@ -21,7 +21,7 @@
</el-col> </el-col>
<el-col :span="24" v-if="judgeShow('type')"> <el-col :span="24" v-if="judgeShow('type')">
<jnpf-form-tip-item label="类型" v-if="judgeShow('type')" prop="type"> <jnpf-form-tip-item label="类型" v-if="judgeShow('type')" prop="type">
<JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)" :disabled="judgeWrite('type')" <JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)" :disabled="true"
optionType="button" direction="horizontal" size="medium" :options="typeOptions" :props="typeProps"> optionType="button" direction="horizontal" size="medium" :options="typeOptions" :props="typeProps">
</JnpfRadio> </JnpfRadio>
</jnpf-form-tip-item> </jnpf-form-tip-item>
@ -650,9 +650,6 @@
}, { }, {
"fullName": "销售付款", "fullName": "销售付款",
"id": "2" "id": "2"
}, {
"fullName": "其他付款",
"id": "3"
}], }],
typeProps: { typeProps: {
"label": "fullName", "label": "fullName",

@ -43,8 +43,8 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()"> <!-- <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()">
</el-button> </el-button> -->
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'"> <el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'">
</el-button> </el-button>
</div> </div>

@ -1828,9 +1828,6 @@
}, { }, {
"fullName": "销售结算", "fullName": "销售结算",
"id": "2" "id": "2"
}, {
"fullName": "其他结算",
"id": "3"
}], }],
typeProps: { typeProps: {
"label": "fullName", "label": "fullName",
@ -2268,7 +2265,7 @@
excludeIdList.push(this.dataForm.cwsettlementaccountList[i].accountId); excludeIdList.push(this.dataForm.cwsettlementaccountList[i].accountId);
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.goodsBox.init(excludeIdList, this.dataForm.cwsettlementsubjectList[0].subjectName, this.dataForm.cwsettlementcontractList[0].contractName, '1') this.$refs.goodsBox.init(excludeIdList, this.dataForm.cwsettlementsubjectList[0].subjectName, this.dataForm.cwsettlementcontractList[0].contractName, '1', this.dataForm.type)
}) })
}, },
choice2() { choice2() {

@ -76,11 +76,12 @@ export default {
accountSubjectName: '', accountSubjectName: '',
contractCode: '', contractCode: '',
accountState: '', accountState: '',
type: '',
checked: [] checked: []
} }
}, },
methods: { methods: {
init(excludeIdList, accountSubjectName, contractCode, accountState) { init(excludeIdList, accountSubjectName, contractCode, accountState, type) {
this.visible = true this.visible = true
this.listLoading = true this.listLoading = true
if (excludeIdList && excludeIdList instanceof Array) { if (excludeIdList && excludeIdList instanceof Array) {
@ -95,6 +96,9 @@ export default {
if (accountState && typeof(accountState) == 'string') { if (accountState && typeof(accountState) == 'string') {
this.accountState = accountState; this.accountState = accountState;
} }
if (type && typeof(type) == 'string') {
this.type = type;
}
let query = { let query = {
...this.listQuery, ...this.listQuery,
keyword: this.keyword, keyword: this.keyword,
@ -102,6 +106,7 @@ export default {
accountSubjectName: this.accountSubjectName, accountSubjectName: this.accountSubjectName,
contractCode: this.contractCode, contractCode: this.contractCode,
accountState: this.accountState, accountState: this.accountState,
type: this.type,
dataType: 0, dataType: 0,
menuId: '532534014720895941', menuId: '532534014720895941',
queryFlowTaskPass: '1'// queryFlowTaskPass: '1'//

Loading…
Cancel
Save