销售订单问题修改

jg-waiwang-pro
vayne 6 months ago
parent 30e034b080
commit ce23d76f31

@ -18,6 +18,8 @@
<result column="shipping_address" property="shippingAddress"></result> <result column="shipping_address" property="shippingAddress"></result>
<result column="warehouse_id" property="warehouseId"></result> <result column="warehouse_id" property="warehouseId"></result>
<result column="remark" property="remark"></result> <result column="remark" property="remark"></result>
<result column="delivery_time" property="deliveryTime"></result>
<result column="delivery_num" property="deliveryNum"></result>
<result column="f_creator_time" property="creatorTime"></result> <result column="f_creator_time" property="creatorTime"></result>
<result column="f_creator_user_id" property="creatorUserId"></result> <result column="f_creator_user_id" property="creatorUserId"></result>
<result column="f_last_modify_time" property="lastModifyTime"></result> <result column="f_last_modify_time" property="lastModifyTime"></result>

@ -22,6 +22,9 @@
<result column="delivery_address" property="deliveryAddress"/> <result column="delivery_address" property="deliveryAddress"/>
<result column="warehouse_id" property="warehouseId"/> <result column="warehouse_id" property="warehouseId"/>
<result column="remark" property="remark"/> <result column="remark" property="remark"/>
<result column="plan_return_num" property="planReturnNum"/>
<result column="returned_num" property="returnedNum"/>
<result column="returned_no" property="returnedNo"/>
<result column="f_creator_time" property="creatorTime"/> <result column="f_creator_time" property="creatorTime"/>
<result column="f_creator_user_id" property="creatorUserId"/> <result column="f_creator_user_id" property="creatorUserId"/>
<result column="f_last_modify_time" property="lastModifyTime"/> <result column="f_last_modify_time" property="lastModifyTime"/>

@ -561,7 +561,13 @@ public class BusinessOrderController {
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId()); flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper); List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
if(flowTaskNodeEntityList != null && flowTaskNodeEntityList.size()>0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) { if(flowTaskNodeEntityList != null && flowTaskNodeEntityList.size()>0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
entity.setStatus("3");//审核通过后状态改为待入库 if (StringUtils.isNotEmpty(entity.getBusinessType()) && entity.getBusinessType().equals("1")) {
entity.setStatus("3");//采购单审核通过后状态改为待入库
}else if(StringUtils.isNotEmpty(entity.getBusinessType()) && entity.getBusinessType().equals("2") && entity.getDeliveryType().equals("1")){
entity.setStatus("3");
}else if(StringUtils.isNotEmpty(entity.getBusinessType()) && entity.getBusinessType().equals("2") && entity.getDeliveryType().equals("2")){
entity.setStatus("4");
}
businessOrderService.saveOrUpdate(entity); businessOrderService.saveOrUpdate(entity);
} }
} }

@ -76,18 +76,16 @@
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="发货仓库" align="center" width="100"> <el-table-column prop="warehouseName" label="发货仓库" align="center" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="1" label="发货数量" align="center" width="100"> <el-table-column prop="deliveryNum" label="发货数量" align="center" width="100">
</el-table-column>
<el-table-column prop="2" label="已发货数量" align="center" width="120">
</el-table-column> </el-table-column>
<el-table-column prop="preparationTime" label="制单时间" align="center" width="100"> <el-table-column prop="preparationTime" label="制单时间" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.preparationTime | toDate("yyyy-MM-dd") }} {{ scope.row.preparationTime | toDate("yyyy-MM-dd") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="plannedDeliveryTimeStart" label="发货时间" align="center" width="100"> <el-table-column prop="deliveryTime" label="发货时间" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.plannedDeliveryTimeStart | toDate("yyyy-MM-dd") }} {{ scope.row.deliveryTime | toDate("yyyy-MM-dd") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="realName" label="提交人" align="center" width="100"> <el-table-column prop="realName" label="提交人" align="center" width="100">

@ -74,7 +74,7 @@
</JnpfDatePicker> --> </JnpfDatePicker> -->
<el-date-picker v-model="dataForm.expectArriveDate" type="daterange" <el-date-picker v-model="dataForm.expectArriveDate" type="daterange"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"> start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
:disabled="judgeWrite('expectArriveDate')" :disabled="judgeWrite('expectArriveDateStart')"
</el-date-picker> </el-date-picker>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>

@ -451,7 +451,7 @@ export default {
return return
} }
const selectData = this.multipleSelectionItem const selectData = this.multipleSelectionItem
if (selectData.isTransfer == '2') { if (selectData[0].isTransfer == '2') {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '该订单已经生成过销售订单', message: '该订单已经生成过销售订单',

@ -505,6 +505,7 @@ export default {
data: _query data: _query
}).then(res => { }).then(res => {
var _list = res.data.list; var _list = res.data.list;
debugger
this.list = _list.map(o => ({ this.list = _list.map(o => ({
...o, ...o,
...this.expandObj, ...this.expandObj,

@ -74,6 +74,7 @@
</JnpfDatePicker> --> </JnpfDatePicker> -->
<el-date-picker v-model="dataForm.expectArriveDate" type="daterange" <el-date-picker v-model="dataForm.expectArriveDate" type="daterange"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"> start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
:disabled="judgeWrite('expectArriveDateStart')"
</el-date-picker> </el-date-picker>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
@ -449,6 +450,25 @@
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8" v-if="judgeShow('transportMode')">
<jnpf-form-tip-item label="承运方式" v-if="judgeShow('transportMode')" prop="carriageMode">
<JnpfSelect v-model="dataForm.carriageMode" @change="changeData('transportMode', -1)"
placeholder="请选择" :disabled="judgeWrite('transportMode')" clearable
:style='{ "width": "100%" }' :options="transportationMethodOptions"
:props="transportationMethodProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<template v-if="this.dataForm.carriageMode == '2'">
<el-col :span="8" v-if="judgeShow('transportMode')">
<jnpf-form-tip-item label="承运商" v-if="judgeShow('transportMode')" prop="carrier">
<JnpfInput v-model="dataForm.carrier" @change="changeData('transportMode', -1)"
placeholder="请输入" :disabled="judgeWrite('transportMode')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
</template>
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item> <jnpf-form-tip-item>
<JnpfGroupTitle content="结算信息" contentPosition="left"> <JnpfGroupTitle content="结算信息" contentPosition="left">
@ -956,8 +976,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="choiceProduct(dataForm.contractId)" <div class="table-actions" @click="choiceProduct"
v-if="this.dataForm.orderType == '3'"> v-if="this.dataForm.orderType == '3' && this.isLongAgreement == '2'">
<el-button type="text" icon="el-icon-plus">添加</el-button> <el-button type="text" icon="el-icon-plus">添加</el-button>
</div> </div>
<div class="table-actions" @click="addProduct" v-if="this.dataForm.orderType == '1'"> <div class="table-actions" @click="addProduct" v-if="this.dataForm.orderType == '1'">
@ -1007,6 +1027,7 @@ export default {
props: [], props: [],
data() { data() {
return { return {
isLongAgreement: '',
BomgoodsBoxVisible: false, BomgoodsBoxVisible: false,
BomgoodsBoxVisible1: false, BomgoodsBoxVisible1: false,
dataFormSubmitType: 0, dataFormSubmitType: 0,
@ -1110,6 +1131,8 @@ export default {
deliveryWarehouse: undefined, deliveryWarehouse: undefined,
deliveryAddress: undefined, deliveryAddress: undefined,
transportMode: undefined, transportMode: undefined,
carriageMode: undefined,
carrier: undefined,
remark: undefined, remark: undefined,
status: undefined, status: undefined,
settlementInfoList: [], settlementInfoList: [],
@ -1284,6 +1307,8 @@ export default {
businessorderproductrelationalsalesMainUnitIdProps: { "label": "fullName", "value": "id" }, businessorderproductrelationalsalesMainUnitIdProps: { "label": "fullName", "value": "id" },
costBearingMianOptions: [{ "fullName": "甲方", "id": "1" }, { "fullName": "乙方", "id": "2" }], costBearingMianOptions: [{ "fullName": "甲方", "id": "1" }, { "fullName": "乙方", "id": "2" }],
costBearingMianProps: { "label": "fullName", "value": "id" }, costBearingMianProps: { "label": "fullName", "value": "id" },
transportationMethodOptions: [{ "fullName": "仓库承运(DC)", "id": "1" }, { "fullName": "承运商", "id": "2" }, { "fullName": "供应商", "id": "3" }, { "fullName": "自提", "id": "4" }],
transportationMethodProps: { "label": "fullName", "value": "id" },
childIndex: -1, childIndex: -1,
isEdit: false, isEdit: false,
interfaceRes: { interfaceRes: {
@ -1350,6 +1375,8 @@ export default {
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) { if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) {
this.initDefaultData() this.initDefaultData()
this.dataForm.businessType = '2' this.dataForm.businessType = '2'
const user = this.$store.getters.userInfo
this.dataForm.enterpriseId = user.organizeId
} }
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm)) this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
}, },
@ -1480,14 +1507,16 @@ export default {
} }
}, },
contractInfo(val, val2) { contractInfo(val, val2) {
this.dataForm.expectArriveDate = [];
if (val2.contractPeriodTime && val2.contractPeriodTimeEnd) { if (val2.contractPeriodTime && val2.contractPeriodTimeEnd) {
this.dataForm.expectArriveDate[0] = new Date(val2.contractPeriodTime) this.dataForm.expectArriveDate[0] = new Date(val2.contractPeriodTime)
this.dataForm.expectArriveDate[1] = new Date(val2.contractPeriodTimeEnd) this.dataForm.expectArriveDate[1] = new Date(val2.contractPeriodTimeEnd)
} }
this.dataForm.contractInfoList = [] this.dataForm.contractInfoList = []
this.dataForm.contractInfoList[0] = val2 this.dataForm.contractInfoList[0] = val2
this.isLongAgreement = val2.isLongAgreement
this.dataForm.firstSubjectBasicId = val2.subject this.dataForm.firstSubjectBasicId = val2.subject
this.dataForm.enterpriseId = val2.deptId // this.dataForm.enterpriseId = val2.deptId
this.dataForm.receiveAddress = val2.deliveryLocation this.dataForm.receiveAddress = val2.deliveryLocation
this.dataForm.transportMode = val2.modeTransport this.dataForm.transportMode = val2.modeTransport
this.dataForm.transactionMode = val2.deliveryModel this.dataForm.transactionMode = val2.deliveryModel

@ -71,14 +71,6 @@
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()" <el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除 v-has="'btn_batchRemove'">批量删除
</el-button> </el-button>
<!-- <template v-if="this.deliveryType == '2'">
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="boundCheck()">库存检查
</el-button>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="boundLock()">库存锁定
</el-button>
</template> -->
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="createPurchaseOrder()">生成采购订单 @click="createPurchaseOrder()">生成采购订单
</el-button> </el-button>
@ -113,7 +105,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="saleMode1" label="销售模式" sortable align="center" width="100"> <el-table-column prop="saleMode1" label="销售模式" sortable align="center" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="purchaseCode" label="关联据号" sortable align="center" width="160"> <el-table-column prop="purchaseCode" label="关联采购单" sortable align="center" width="160">
</el-table-column> </el-table-column>
<el-table-column prop="purchaseStatus" label="关联单据状态" sortable align="center" width="120"> <el-table-column prop="purchaseStatus" label="关联单据状态" sortable align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -130,22 +122,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="wareHouseName" label="发货仓库" sortable align="center" width="100"> <el-table-column prop="wareHouseName" label="发货仓库" sortable align="center" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="1" label="计划销售数量" sortable align="center" width="140"> <el-table-column prop="planPurchaseNum" label="计划销售数量" sortable align="center"
width="140">
</el-table-column> </el-table-column>
<el-table-column prop="2" label="已发货数量" sortable align="center" width="120"> <el-table-column prop="receivedNum" label="已发货数量" sortable align="center" width="120">
</el-table-column> </el-table-column>
<el-table-column prop="3" label="发货次数" sortable align="center" width="100"> <el-table-column prop="receivedNo" label="发货次数" sortable align="center" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="settlementMethod1" label="结算方式" sortable align="center" <el-table-column prop="settlementMethod1" label="结算方式" sortable align="center"
width="100"> width="100">
</el-table-column> </el-table-column>
<el-table-column prop="transportMode1" label="运输方式" sortable align="center" width="100"> <el-table-column prop="transportMode1" label="运输方式" sortable align="center" width="100">
</el-table-column> </el-table-column>
<!-- <el-table-column prop="wareHouseName" label="承运类型" sortable align="center" width="100"> <el-table-column prop="carriageMode1" label="承运类型" sortable align="center" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="wareHouseName" label="承运商" sortable align="center" width="100"> <el-table-column prop="carrier1" label="承运商" sortable align="center" width="100">
</el-table-column> -->
<el-table-column prop="wareHouseName" label="是否补送" sortable align="center" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="expectArriveDateStart" label="期望送达" sortable align="center" <el-table-column prop="expectArriveDateStart" label="期望送达" sortable align="center"
width="100"> width="100">
@ -440,7 +431,7 @@ export default {
}) })
return return
} }
if (!this.multipleSelectionItem.length > 1) { if (this.multipleSelectionItem.length > 1) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '只能选择一条数据', message: '只能选择一条数据',
@ -449,7 +440,7 @@ export default {
return return
} }
const selectData = this.multipleSelectionItem const selectData = this.multipleSelectionItem
if (selectData.isTransfer == '2') { if (selectData[0].isTransfer == '2') {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '该订单已经生成过采购订单', message: '该订单已经生成过采购订单',
@ -457,6 +448,14 @@ export default {
}) })
return return
} }
if (selectData[0].saleMode == '2') {
this.$message({
type: 'error',
message: '该订单为以采定销,不能生成采购订单',
duration: 1500,
})
return
}
selectData.flag = '销售转采购' selectData.flag = '销售转采购'
if (!this.purchaseFlowList.length) { if (!this.purchaseFlowList.length) {
this.$message({ type: 'error', message: '流程不存在' }); this.$message({ type: 'error', message: '流程不存在' });

Loading…
Cancel
Save