Merge remote-tracking branch 'origin/dev_ksck_z' into dev_ksck_z

20240912_adapter_z
yewj 8 months ago
commit 83ea4171dc

@ -8,6 +8,13 @@ export function orderPage(query) {
params: query params: query
}); });
} }
export function findByBill(query) {
return axios({
url: "/udiwms/basic/collect/order/findByBill",
method: "get",
params: query
});
}
export function getNextOrder(query) { export function getNextOrder(query) {
return axios({ return axios({

@ -228,10 +228,10 @@ export default {
{ required: true, message: '请选择异常方式提醒', trigger: 'blur' } { required: true, message: '请选择异常方式提醒', trigger: 'blur' }
], ],
corpType: [ corpType: [
{ required: true, message: '请选择往来单位类型', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
], ],
unitTittle: [ unitTittle: [
{ required: true, message: '请输入往来类型标题', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
], ],
} }
} }
@ -311,8 +311,8 @@ export default {
} }
}) })
} else { } else {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((rules) => {
if (valid){ if (rules){
addBusType(this.formData).then(res => { addBusType(this.formData).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.$message.success('新增成功') this.$message.success('新增成功')
@ -332,6 +332,25 @@ export default {
}, },
hideForm() { hideForm() {
this.closeDialog() this.closeDialog()
},
// scanType
updateFormRules() {
if (this.formData.scanType === 1) {
// scanType1corpTypeunitTittle
this.$set(this.formRules.corpType, 0, { required: false });
this.$set(this.formRules.unitTittle, 0, { required: false });
} else {
//
this.$set(this.formRules.corpType, 0, { required: true, message: '请选择往来单位类型', trigger: 'blur' });
this.$set(this.formRules.unitTittle, 0, { required: true, message: '请输入往来类型标题', trigger: 'blur' });
}
},
},
watch: {
// scanType
'formData.scanType': function(newVal, oldVal) {
this.updateFormRules();
} }
}, },
created() { created() {

@ -218,14 +218,14 @@
</pagination> </pagination>
</el-tab-pane> </el-tab-pane>
<el-tab-pane> <el-tab-pane>
<span slot="label">{{ workplaceName }}-单据类型</span> <span slot="label">{{ workplaceName }}-业务类型</span>
<el-form :inline="true" :model="busQuery" class="query-form" size="mini" <el-form :inline="true" :model="busQuery" class="query-form" size="mini"
style="margin-bottom: 10px" style="margin-bottom: 10px"
> >
<el-form-item class="query-form-item" label="单据类型编号/业务名称:"> <el-form-item class="query-form-item" label="业务类型编号/业务名称:">
<el-input <el-input
v-model="busQuery.busKey" v-model="busQuery.busKey"
placeholder="请输入单据类型编号/业务名称" placeholder="请输入业务类型编号/业务名称"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -244,7 +244,7 @@
> >
<el-button type="primary" @click="chooseBusType" <el-button type="primary" @click="chooseBusType"
icon="el-icon-plus" icon="el-icon-plus"
>新增单据类型 >新增业务类型
</el-button </el-button
> >
</el-button-group> </el-button-group>
@ -254,7 +254,7 @@
highlight-current-row highlight-current-row
> >
<el-table-column type="index" label="序号"></el-table-column> <el-table-column type="index" label="序号"></el-table-column>
<el-table-column label="单据类型编码 " prop="documentTypeCode"></el-table-column> <el-table-column label="业务类型编码 " prop="documentTypeCode"></el-table-column>
<el-table-column label="业务名称 " prop="busName"></el-table-column> <el-table-column label="业务名称 " prop="busName"></el-table-column>
<el-table-column label="仓库名称 " prop="invName"></el-table-column> <el-table-column label="仓库名称 " prop="invName"></el-table-column>
<el-table-column label="是否配套系统" prop="isMatching"> <el-table-column label="是否配套系统" prop="isMatching">
@ -700,8 +700,8 @@ export default {
}, },
busName: '', busName: '',
busTypeMap: { busTypeMap: {
'add': '新增单据类型', 'add': '新增业务类型',
'edit': '编辑单据类型' 'edit': '编辑业务类型'
}, },
formData: { formData: {
operationType: 1, operationType: 1,

@ -208,6 +208,7 @@
:total="total" :total="total"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:page-sizes="[12, 24, 48]"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</el-card> </el-card>
@ -306,6 +307,7 @@
:total="total" :total="total"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:page-sizes="[12, 24, 48]"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</div> </div>
@ -408,7 +410,7 @@ export default {
billNo: null, billNo: null,
tagStatus: null, tagStatus: null,
page: 1, page: 1,
limit: 10, limit: 12,
}, },
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
loading: false, loading: false,
@ -488,7 +490,12 @@ export default {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
onReset() { onReset() {
this.filterQuery = {}; this.filterQuery = {
billNo: null,
tagStatus: null,
page: 1,
limit: 12,
};
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
}, },

@ -326,7 +326,7 @@ import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder"; import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
import {getCurOrder, getNextOrder} from "@/api/collect/collectOrder"; import {getCurOrder, getNextOrder,findByBill} from "@/api/collect/collectOrder";
import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail"; import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
@ -365,6 +365,7 @@ export default {
curWorkPlaces: [], curWorkPlaces: [],
erpList: [], erpList: [],
formData: { formData: {
billNo:null,
tagStatus: -1, tagStatus: -1,
invCode: null, invCode: null,
busType: null, busType: null,
@ -416,6 +417,21 @@ export default {
PanelOrderAllDetail PanelOrderAllDetail
}, },
methods: { methods: {
getBillNo(billNo){
let post = {
billNo: billNo,
page: 1,
limit: 10,
}
findByBill(post).then(res => {
if (res.code == 20000) {
if (res.data.list.length > 0){
this.formData = res.data.list[0]
}
}
})
},
selectBusType(val) { selectBusType(val) {
this.formData.busType = val this.formData.busType = val
this.selectBusTypeDisabled = false this.selectBusTypeDisabled = false
@ -438,7 +454,12 @@ export default {
if (this.formDataVisible.scanType == 1) { if (this.formDataVisible.scanType == 1) {
this.findFromInvList(""); this.findFromInvList("");
} }
this.findCurOrder(); if (this.formData.billNo != null){
this.getBillNo(this.formData.billNo)
}else {
this.findCurOrder();
}
} else { } else {
this.formData.busType = null this.formData.busType = null
} }
@ -844,15 +865,21 @@ export default {
}); });
this.findCurWorkPlaces(); this.findCurWorkPlaces();
this.formData.invCode = this.$store.getters.locInvCode; this.formData.invCode = this.$store.getters.locInvCode;
if (this.$route.query.billNo != null) {
this.formData.billNo = this.$route.query.billNo
}
if (this.$route.query.workplaceId != null) { if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true this.isLinkDisabled = true
this.selectBusTypeDisabled = true this.selectBusTypeDisabled = true
this.corpOrderIdDisabled = true this.corpOrderIdDisabled = true
this.workplaceId = Number(this.$route.query.workplaceId);
this.formData.workPlaceCode = Number(this.$route.query.workplaceId); this.formData.workPlaceCode = Number(this.$route.query.workplaceId);
this.getWorkBindBusTypes(this.formData.workPlaceCode); this.getWorkBindBusTypes(this.formData.workPlaceCode);
} }
} }
} }

@ -326,7 +326,7 @@ import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder"; import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
import {getCurOrder, getNextOrder} from "@/api/collect/collectOrder"; import {getCurOrder, getNextOrder,findByBill} from "@/api/collect/collectOrder";
import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail"; import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
@ -365,6 +365,7 @@ export default {
curWorkPlaces: [], curWorkPlaces: [],
erpList: [], erpList: [],
formData: { formData: {
billNo:null,
tagStatus: -1, tagStatus: -1,
invCode: null, invCode: null,
busType: null, busType: null,
@ -416,6 +417,21 @@ export default {
PanelOrderAllDetail PanelOrderAllDetail
}, },
methods: { methods: {
getBillNo(billNo){
let post = {
billNo: billNo,
page: 1,
limit: 10,
}
findByBill(post).then(res => {
if (res.code == 20000) {
if (res.data.list.length > 0){
this.formData = res.data.list[0]
}
}
})
},
selectBusType(val) { selectBusType(val) {
this.formData.busType = val this.formData.busType = val
this.selectBusTypeDisabled = false this.selectBusTypeDisabled = false
@ -438,7 +454,12 @@ export default {
if (this.formDataVisible.scanType == 1) { if (this.formDataVisible.scanType == 1) {
this.findFromInvList(""); this.findFromInvList("");
} }
this.findCurOrder(); if (this.formData.billNo != null){
this.getBillNo(this.formData.billNo)
}else {
this.findCurOrder();
}
} else { } else {
this.formData.busType = null this.formData.busType = null
} }
@ -844,15 +865,21 @@ export default {
}); });
this.findCurWorkPlaces(); this.findCurWorkPlaces();
this.formData.invCode = this.$store.getters.locInvCode; this.formData.invCode = this.$store.getters.locInvCode;
if (this.$route.query.billNo != null) {
this.formData.billNo = this.$route.query.billNo
}
if (this.$route.query.workplaceId != null) { if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true this.isLinkDisabled = true
this.selectBusTypeDisabled = true this.selectBusTypeDisabled = true
this.corpOrderIdDisabled = true this.corpOrderIdDisabled = true
this.workplaceId = Number(this.$route.query.workplaceId);
this.formData.workPlaceCode = Number(this.$route.query.workplaceId); this.formData.workPlaceCode = Number(this.$route.query.workplaceId);
this.getWorkBindBusTypes(this.formData.workPlaceCode); this.getWorkBindBusTypes(this.formData.workPlaceCode);
} }
} }
} }

@ -41,9 +41,17 @@
<el-button-group <el-button-group
style="display: flex; margin: 0px 0 15px 0; float: right" style="display: flex; margin: 0px 0 15px 0; float: right"
> >
<!-- <el-button size="mini" type="primary" @click.native="saveOrder()" :loading="saveLoading"--> <!--<el-button size="mini" type="primary" @click.native="saveOrder()" :loading="saveLoading"-->
<!-- >草稿保存--> <!--&gt;草稿保存-->
<!-- </el-button>--> <!--</el-button>-->
<el-button size="mini" type="primary" @click.native="chooseDraftOrder()" :loading="submitLoading"
v-if="splitType=='out'"style="margin-right: 8px;border-radius: 5%;"
>选入草稿单据
</el-button>
<el-button size="mini" type="primary" @click.native="draftOrder()" :loading="submitLoading"
v-if="splitType=='out'"style="margin-right: 8px;border-radius: 5%;"
>草稿保存
</el-button>
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading" <el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
v-if="splitType=='out'" style="margin-right: 8px;border-radius: 5%;" v-if="splitType=='out'" style="margin-right: 8px;border-radius: 5%;"
>上货完成 >上货完成
@ -252,6 +260,23 @@
></codesPanel> ></codesPanel>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog
title="选入草稿单据"
:visible.sync="chooseDraftOrderVisible"
width="80%"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="chooseDraftOrderVisible"
>
<chooseDraftOrderDialog
:rowData="rowData"
:closeChooseDialog="closeChooseDialog"
:handleChoose="handleChoose"
>
</chooseDraftOrderDialog>
</el-dialog>
</div> </div>
</template> </template>
@ -287,6 +312,7 @@ import dialogInvProduct from "@/views/inout/DialogSelectInvProduct";
import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage"; import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
import {printSplitLabel} from "@/api/collect/splitCreateOrder"; import {printSplitLabel} from "@/api/collect/splitCreateOrder";
import {findInvRemind} from "@/api/inout/splitCode"; import {findInvRemind} from "@/api/inout/splitCode";
import chooseDraftOrderDialog from "./chooseDraftOrderDialog"
export default { export default {
name: "ioCreateOrder", name: "ioCreateOrder",
@ -480,6 +506,7 @@ export default {
// //
selectInvProductVisible: false, selectInvProductVisible: false,
chooseDraftOrderVisible: false,
invQueryData: { invQueryData: {
invCode: null, invCode: null,
}, },
@ -490,6 +517,7 @@ export default {
scanResultType: "success", scanResultType: "success",
msgTip: "当前工位存量提醒:", msgTip: "当前工位存量提醒:",
splitType: null, splitType: null,
rowData: {}
}; };
}, },
components: { components: {
@ -497,7 +525,7 @@ export default {
codeDetailPanel, codeDetailPanel,
editCodeDialog, editCodeDialog,
DialogCreateOrderSelect, DialogCreateOrderSelect,
DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct,chooseDraftOrderDialog
}, },
methods: { methods: {
changeInvRemind(val) { changeInvRemind(val) {
@ -1415,11 +1443,29 @@ export default {
}); });
} }
}, },
saveOrder() { //稿
chooseDraftOrder(){
if (this.$isBlank(this.orderFormData.workPlaceCode)) {
this.$message.warning("请选择工位!");
return;
}
this.rowData.workPlaceCode = this.orderFormData.workPlaceCode
this.rowData.fifoSplit = this.orderFormData.fifoSplit
this.chooseDraftOrderVisible = true
},
closeChooseDialog(){
this.chooseDraftOrderVisible = false
},
handleChoose(billNo){
this.orderFormData.billNo = billNo
this.refreshCodesPanel();
},
draftOrder() {
let tQuery = Object.assign( let tQuery = Object.assign(
JSON.parse(JSON.stringify(this.orderFormData)) JSON.parse(JSON.stringify(this.orderFormData))
); );
tQuery.billNo = this.orderFormData.billNo; tQuery.billNo = this.orderFormData.billNo;
tQuery.orderType = 2;
console.log("tQuery:"); console.log("tQuery:");
console.log(tQuery); console.log(tQuery);
if (this.orderFormData.billNo == null) { if (this.orderFormData.billNo == null) {
@ -1427,12 +1473,12 @@ export default {
return; return;
} }
this.saveLoading = true this.saveLoading = true
saveOrderWeb(tQuery).then((response) => { saveOrderWeb(tQuery).then((response) => {
this.saveLoading = false this.saveLoading = false
if (response.code === 20000) { if (response.code === 20000) {
if (this.closeDialog != undefined) { this.$message.success("保存成功")
this.closeDialog(); this.successCloseData()
}
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
@ -1440,7 +1486,6 @@ export default {
this.saveLoading = false this.saveLoading = false
}); });
}, },
// //
resetForm() { resetForm() {
if (this.$refs["dataForm"]) { if (this.$refs["dataForm"]) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save