jg-waiwang-pro
vayne 7 months ago
parent 96abc3d431
commit 8e65a7ff2d

@ -236,6 +236,9 @@
AND f.f_delete_mark IS NULL
WHERE
a.contract_type = '1'
AND a.business_id = #{businessLineId}
AND DATE_FORMAT( a.contract_period_time, '%Y-%m-%d' ) <= DATE_FORMAT( NOW( ), '%Y-%m-%d' )
AND DATE_FORMAT( a.contract_period_time_end, '%Y-%m-%d' ) >= DATE_FORMAT( NOW( ), '%Y-%m-%d' )
AND a.f_delete_mark IS NULL
</select>
@ -278,9 +281,8 @@
end as fixPriceMode1,
case
a.delivery_type
when '1' then '无'
when '2' then '仓配'
when '3' then '直送'
when '1' then '仓配'
when '2' then '直送'
end as deliveryType1,
case
a.transport_mode
@ -371,9 +373,8 @@
end as fixPriceMode1,
case
a.delivery_type
when '1' then '无'
when '2' then '仓配'
when '3' then '直送'
when '1' then '仓配'
when '2' then '直送'
end as deliveryType1,
case
a.transport_mode

@ -30,7 +30,7 @@ public interface BusinessOrderMapper extends BaseMapper<BusinessOrderEntity> {
List<ContractLEntity> querySaleContract();
List<ContractLEntity> queryPurchaseContract();
List<ContractLEntity> queryPurchaseContract(String businessLineId);
//采购订单查询

@ -47,7 +47,7 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
List<ContractLEntity> querySaleContractInfo();
//查询采购合同
List<ContractLEntity> queryPurchaseContractInfo();
List<ContractLEntity> queryPurchaseContractInfo(String businessLineId);
//查询采购订单列表
List<BusinessOrderEntity> getPurchaseList(BusinessOrderPagination businessOrderPagination);

@ -1034,7 +1034,7 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
}
@Override
public List<ContractLEntity> queryPurchaseContractInfo() {
return businessOrderMapper.queryPurchaseContract();
public List<ContractLEntity> queryPurchaseContractInfo(String businessLineId) {
return businessOrderMapper.queryPurchaseContract(businessLineId);
}
}

@ -92,7 +92,6 @@ public class BusinessLineController {
@GetMapping("/WorkTree")
public ActionResult<List<BusinessLineSonTree>> WorkTree() {
List<BusinessLineEntity> list = businessLineService.list();
List<BusinessLineEntity> workTreeList =new ArrayList<>();
for (BusinessLineEntity businessLineEntity:list){
if (businessLineEntity.getDiffFlag().equals("3")||businessLineEntity.getDiffFlag().equals("5")){

@ -744,8 +744,8 @@ public class BusinessOrderController {
*/
@Operation(summary = "获取采购合同列表")
@GetMapping("/getPurchaseContractList")
public ActionResult list3()throws IOException{
List<ContractLEntity> list= businessOrderService.queryPurchaseContractInfo();
public ActionResult list3(@RequestParam("businessLineId") String businessLineId)throws IOException{
List<ContractLEntity> list= businessOrderService.queryPurchaseContractInfo(businessLineId);
for (ContractLEntity entity : list){
List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId());
entity.setProductByContractModelList(productByContractModelList);

@ -579,7 +579,7 @@ public class VoucherController {
* @param
* @return
*/
@Operation(summary = "获取销售发货凭证列表")
@Operation(summary = "获取凭证列表和关联的商品")
@PostMapping("/getVoucherList")
public ActionResult voucherPopup(@RequestBody VoucherPagination voucherPagination)throws IOException{
//查询凭证列表弹窗

@ -105,7 +105,7 @@
:disabled="judgeWrite('businesscontactList') || judgeWrite('businesscontactList-name')" clearable
:style='{ "width": "100%" }'>
</JnpfInput> -->
<JnpfUserSelect v-model="scope.row.name" @change="changeData('businesscontact-name', -1)"
<JnpfUserSelect v-model="scope.row.name" @change="userName"
placeholder="请选择" selectType="all" :ableIds="ableAll.belongUserIdableIds"
:disabled="judgeWrite('businesscontactList') || judgeWrite('businesscontactList-name')" clearable
:style='{ "width": "100%" }'>
@ -216,6 +216,7 @@ export default {
props: [],
data() {
return {
userNameIndex: 0,
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
@ -354,6 +355,26 @@ export default {
},
mounted() { },
methods: {
userName(val){
let i = 0
this.dataForm.businessContactList.forEach((e) => {
if(e.name == val){
i++
}
if(i > 1){
setTimeout(() => {
e.name = undefined
}, 100);
this.$message({
message: '姓名不能重复',
type: 'error',
duration: 1000
})
}
return
})
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index

@ -471,7 +471,10 @@ export default {
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
var _data = _list.filter(item => {
return item.flowState == '2'
})
this.list = _data.map(o => ({
...o,
...this.expandObj,
}))

@ -409,6 +409,7 @@ export default {
url: `/api/scm/BusinessLine/Tree`,
method: 'get'
}).then(res => {
debugger
this.treeData = res.data
this.initSearchDataAndListData()
})

@ -221,7 +221,7 @@
:disabled="judgeWrite('businesscontactList') || judgeWrite('businesscontactList-name')" clearable
:style='{ "width": "100%" }'>
</JnpfInput> -->
<JnpfUserSelect v-model="scope.row.name" @change="changeData('businesscontact-name', -1)"
<JnpfUserSelect v-model="scope.row.name" @change="userName"
placeholder="请选择" selectType="all" :ableIds="ableAll.belongUserIdableIds"
:disabled="judgeWrite('businesscontactList') || judgeWrite('businesscontactList-name')" clearable
:style='{ "width": "100%" }'>
@ -784,6 +784,25 @@ export default {
},
mounted() { },
methods: {
userName(val){
let i = 0
this.dataForm.businessContactList.forEach((e) => {
if(e.name == val){
i++
}
if(i > 1){
setTimeout(() => {
e.name = undefined
}, 100);
this.$message({
message: '姓名不能重复',
type: 'error',
duration: 1000
})
}
return
})
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index

@ -71,7 +71,7 @@
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod"
row-key="id" :tree-props="{ children: 'children', hasChildren: '' }" :default-expand-all="expandsTable"
v-if="refreshTable" custom-column border>
<el-table-column prop="name" label="业务组织名称" sortable align="center" fixed="left">
<el-table-column prop="name" label="业务组织名称" sortable align="left" fixed="left">
</el-table-column>
<el-table-column prop="type" label="类型" sortable align="center" fixed="left">
</el-table-column>
@ -438,9 +438,23 @@ export default {
...o,
...this.expandObj,
}))
this.list = this.removeFlowState(this.list)
this.listLoading = false
})
},
removeFlowState(list) {
const arr = list.filter(e => e.flowState == 2)
if (arr.length) {
arr.forEach(e => {
if (e.children && e.children.length) {
e.children = this.removeFlowState(e.children)
}
})
return arr
} else {
return arr
}
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'

@ -28,7 +28,7 @@
<el-col :span="8" v-if="judgeShow('deliveryCode')">
<jnpf-form-tip-item label="订单编号" v-if="judgeShow('deliveryCode')" prop="deliveryCode">
<JnpfInput v-model="dataForm.deliveryCode" @change="changeData('deliveryCode', -1)" placeholder="系统自动生成"
:disabled="judgeWrite('deliveryCode')" readonly :style='{ "width": "100%" }'>
:disabled="true" readonly :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -60,7 +60,7 @@
<jnpf-form-tip-item label="业务线" v-if="judgeShow('reservedFields1')" prop="reservedFields1">
<JnpfPopupSelect v-model="dataForm.reservedFields1" @change="changeData('reservedFields1', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.reservedFields1" placeholder="请选择"
:disabled="judgeWrite('reservedFields1')" propsValue="id" popupWidth="800px" popupTitle="选择数据"
:disabled="true" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' field='reservedFields1' interfaceId="517979330417001669"
:pageSize="20" :columnOptions="reservedFields1columnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
@ -852,6 +852,8 @@ export default {
props: [],
data() {
return {
productIdList: [],
productByOrderList: [],
voucherBoxVisible: false,
BomgoodsBoxVisible: false,
dataFormSubmitType: 0,
@ -1156,7 +1158,7 @@ export default {
let businessType = '1';
let documentType = '2';
this.$nextTick(() => {
this.$refs.VoucherBox.init(excludeIdList, businessType, documentType)
this.$refs.VoucherBox.init(excludeIdList, businessType, documentType,this.productIdList)
})
},
initVoucherList(list) {
@ -1176,22 +1178,17 @@ export default {
tareWeight: e.tareWeight,
buckleWeight: e.buckleWeight,
netWeight: e.netWeight,
deliveryNum: e.deliveryNum,
batchNo: e.batchNo,
produceTime: e.produceTime,
returnUnit: e.returnUnit,
tax: e.tax,
taxCount: e.taxCount,
notTaxPrice: e.notTaxPrice,
notTaxCount: e.notTaxCount,
remark: e.remark,
businessType: '3'
}
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.productWarehouseEntityList.forEach(item => {
item.businessType = "3"
const obj = this.productByOrderList.find(e => e.productId == item.id) || {}
item.salesMainUnitId = obj.salesMainUnitId
item.saleNum = obj.businessNum
item.productId = item.id
item.inventoryUnitId = item.inventoryUnitIds
item.businessType = "3"
productEntity = item
})
this.dataForm.deliveryProductRelationList.push(productEntity)
@ -1218,9 +1215,9 @@ export default {
this.dataForm.deliveryAddress = val2.shippingAddress
this.dataForm.reservedFields1 = val2.businessLineId
val2.deliveryProductRelationEntityList.forEach((item, index) => {
item.businessType = "3"
this.productIdList.push(item.productId)
})
this.dataForm.deliveryProductRelationList = val2.deliveryProductRelationEntityList
this.productByOrderList = val2.deliveryProductRelationEntityList
},
initPurchaseData() {
const data = this.setting.selectData

@ -1276,7 +1276,7 @@ export default {
expectArriveDateEnd: [],
createOrderDate: [],
deliveryType: [],
contractId: [],
contractId: [{ "dataType": "varchar", "defaultValue": "", "field": "businessLineId", "fieldName": "", "id": "PneOdw1", "jnpfKey": "popupSelect", "relationField": "businessLineId", "required": "0" }],
currency: [],
saleMode: [],
correlatedOrderId: [],
@ -1389,6 +1389,12 @@ export default {
this.dataForm.businessOrderProductRelationalList.splice(-2, 1)
},
contractInfo(val, val2) {
this.dataForm.expectArriveDate = [];
if (val2.contractPeriodTime && val2.contractPeriodTimeEnd) {
debugger
this.dataForm.expectArriveDate[0] = new Date(val2.contractPeriodTime)
this.dataForm.expectArriveDate[1] = new Date(val2.contractPeriodTimeEnd)
}
this.dataForm.contractInfoList = []
this.dataForm.contractInfoList[0] = val2
this.dataForm.firstSubjectBasicId = val2.subject

@ -667,7 +667,7 @@
<JnpfSelect v-model="scope.row.deliveryUnit"
@change="changeData('deliveryproductrelation-deliveryUnit', scope.$index)" placeholder="请选择"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-deliveryUnit')"
clearable :style='{ "width": "100%" }' :options="deliveryproductrelationdeliveryUnitOptions"
clearable :style='{ "width": "100%" }' :options="scope.row.deliveryproductrelationdeliveryUnitOptions"
:props="deliveryproductrelationdeliveryUnitProps">
</JnpfSelect>
</template>
@ -1218,7 +1218,6 @@ export default {
})
},
initVoucherList(list) {
debugger
for (let i = 0; i < list.length; i++) {
const e = list[i];
let item = {
@ -1240,7 +1239,18 @@ export default {
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.productWarehouseEntityList.forEach(item => {
if (item.orderMainUnitIds) {
var unitName = JSON.parse(item.orderMainUnitIds)
var optArray = [];
for (let i = 0; i < unitName.length; i++) {
item.deliveryUnit = unitName[0]
var opt = {};
opt.fullName = unitName[i];
opt.id = unitName[i];
optArray.push(opt);
}
item.deliveryproductrelationdeliveryUnitOptions = optArray;
}
const obj = this.productByOrderList.find(e => e.productId == item.id) || {}
item.salesMainUnitId = obj.salesMainUnitId
item.saleNum = obj.businessNum

@ -28,7 +28,7 @@
<el-col :span="8" v-if="judgeShow('returnCargoCode')">
<jnpf-form-tip-item label="订单编号" v-if="judgeShow('returnCargoCode')" prop="returnCargoCode">
<JnpfInput v-model="dataForm.returnCargoCode" @change="changeData('returnCargoCode', -1)"
placeholder="系统自动生成" :disabled="judgeWrite('returnCargoCode')" readonly :style='{ "width": "100%" }'>
placeholder="系统自动生成" :disabled="true" readonly :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>

@ -28,7 +28,7 @@
<el-col :span="8" v-if="judgeShow('deliveryCode')">
<jnpf-form-tip-item label="订单编号" v-if="judgeShow('deliveryCode')" prop="deliveryCode">
<JnpfInput v-model="dataForm.deliveryCode" @change="changeData('deliveryCode', -1)" placeholder="系统自动生成"
:disabled="judgeWrite('deliveryCode')" readonly :style='{ "width": "100%" }'>
:disabled="true" readonly :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -842,6 +842,8 @@ export default {
props: [],
data() {
return {
productIdList: [],
productByOrderList: [],
voucherBoxVisible: false,
BomgoodsBoxVisible: false,
dataFormSubmitType: 0,
@ -1147,7 +1149,7 @@ export default {
let businessType = '2';
let documentType = '2';
this.$nextTick(() => {
this.$refs.VoucherBox.init(excludeIdList, businessType, documentType)
this.$refs.VoucherBox.init(excludeIdList, businessType, documentType,this.productIdList)
})
},
initVoucherList(list) {
@ -1167,21 +1169,16 @@ export default {
tareWeight: e.tareWeight,
buckleWeight: e.buckleWeight,
netWeight: e.netWeight,
deliveryNum: e.deliveryNum,
batchNo: e.batchNo,
produceTime: e.produceTime,
returnUnit: e.returnUnit,
tax: e.tax,
taxCount: e.taxCount,
notTaxPrice: e.notTaxPrice,
notTaxCount: e.notTaxCount,
remark: e.remark,
businessType: '4'
}
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.productWarehouseEntityList.forEach(item => {
const obj = this.productByOrderList.find(e => e.productId == item.id) || {}
item.salesMainUnitId = obj.salesMainUnitId
item.saleNum = obj.businessNum
item.productId = item.id
item.inventoryUnitId = item.inventoryUnitIds
item.businessType = "4"
productEntity = item
})
@ -1209,12 +1206,9 @@ export default {
this.dataForm.shippingAddress = val2.deliveryAddress
this.dataForm.reservedFields1 = val2.businessLineId
val2.businessOrderProductRelationalList.forEach((item, index) => {
item.productName = item.name
item.purchaseUnitId = item.salesMainUnitId
item.purchaseNum = item.businessNum
item.businessType = "4"
this.productIdList.push(item.productId)
})
this.dataForm.deliveryProductRelationList = val2.businessOrderProductRelationalList
this.productByOrderList = val2.businessOrderProductRelationalList
},
initPurchaseData() {

@ -1157,7 +1157,7 @@ export default {
businessLineIdcolumnOptions: [{ "label": "业务线编码", "value": "code" }, { "label": "业务线名称", "value": "name" },],
urgentOrderOptions: [{ "fullName": "否", "id": "1" }, { "fullName": "是", "id": "2" }],
urgentOrderProps: { "label": "fullName", "value": "id" },
deliveryTypeOptions: [{ "fullName": "无", "id": "1" }, { "fullName": "仓配", "id": "2" }, { "fullName": "直达", "id": "3" }],
deliveryTypeOptions: [{ "fullName": "仓配", "id": "1" }, { "fullName": "直送", "id": "2" }],
deliveryTypeProps: { "label": "fullName", "value": "id" },
contractIdcolumnOptions: [{ "label": "合同编码", "value": "contractNumber" }, { "label": "合同名称", "value": "contractName" },],
currencyOptions: [{ "fullName": "人民币", "id": "1" }, { "fullName": "港元", "id": "2" }, { "fullName": "美元", "id": "3" }, { "fullName": "欧元", "id": "4" }, { "fullName": "加币", "id": "5" }, { "fullName": "日元", "id": "6" }, { "fullName": "台币", "id": "7" }],
@ -1317,6 +1317,7 @@ export default {
this.dataForm.businessOrderProductRelationalList.splice(-2, 1)
},
contractInfo(val, val2) {
debugger
this.dataForm.contractInfoList = []
this.dataForm.contractInfoList[0] = val2
this.dataForm.firstSubjectBasicId = val2.subject

@ -98,14 +98,14 @@
</el-table-column>
<el-table-column label="单据状态" prop="saleStatus" sortable align="center" fixed="left" width="100">
</el-table-column>
<template v-if="this.deliveryType != '1'">
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="deliveryType1" label="配送方式" sortable align="center" width="100">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
</el-table-column>
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="saleMode1" label="销售模式" sortable align="center" width="100">
</el-table-column>
</template>
<!-- </template> -->
<el-table-column prop="purchaseCode" label="关联单据号" sortable align="center" width="160">
</el-table-column>
<el-table-column prop="purchaseStatus" label="关联单据状态" sortable align="center" width="120">
@ -115,46 +115,46 @@
</el-table-column>
<el-table-column prop="contractNumber" label="关联合同号" sortable align="center" width="120">
</el-table-column>
<template v-if="this.deliveryType == '1'">
<!-- <template v-if="this.deliveryType == '1'">
<el-table-column prop="result" label="校验结果" sortable align="center" width="100">
</el-table-column>
</template>
</template> -->
<el-table-column prop="urgentOrder1" label="是否紧急" sortable align="center" width="100">
</el-table-column>
<el-table-column prop="wareHouseName" label="发货仓库" sortable align="center" width="100">
</el-table-column>
<template v-if="this.deliveryType != '1'">
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="计划销售数量" sortable align="center" width="140">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="已发货数量" sortable align="center" width="120">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="发货次数" sortable align="center" width="100">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="结算方式" sortable align="center" width="100">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="运输方式" sortable align="center" width="100">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="承运类型" sortable align="center" width="100">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="承运商" sortable align="center" width="100">
</el-table-column>
</template>
<template v-if="this.deliveryType != '1'">
<!-- </template> -->
<!-- <template v-if="this.deliveryType != '1'"> -->
<el-table-column prop="wareHouseName" label="是否补送" sortable align="center" width="100">
</el-table-column>
</template>
<!-- </template> -->
<el-table-column prop="expectArriveDateStart" label="期望送达" sortable align="center" width="100">
<template slot-scope="scope">
{{ scope.row.expectArriveDateStart | toDate("yyyy-MM-dd") }}
@ -317,7 +317,7 @@ export default {
orderTypeProps: { "label": "fullName", "value": "id" },
urgentOrderOptions: [{ "fullName": "否", "id": "1" }, { "fullName": "是", "id": "2" }],
urgentOrderProps: { "label": "fullName", "value": "id" },
deliveryTypeOptions: [{ "fullName": "无", "id": "1" }, { "fullName": "仓配", "id": "2" }, { "fullName": "直送", "id": "3" }],
deliveryTypeOptions: [{ "fullName": "仓配", "id": "1" }, { "fullName": "直送", "id": "2" }],
deliveryTypeProps: { "label": "fullName", "value": "id" },
currencyOptions: [{ "fullName": "人民币", "id": "1" }, { "fullName": "港元", "id": "2" }, { "fullName": "美元", "id": "3" }, { "fullName": "欧元", "id": "4" }, { "fullName": "加币", "id": "5" }, { "fullName": "日元", "id": "6" }, { "fullName": "台币", "id": "7" }],
currencyProps: { "label": "fullName", "value": "id" },

Loading…
Cancel
Save