代码备份

prod
anthonywj 2 years ago
parent f7bcb8cc85
commit 4ff95bab94

@ -128,8 +128,12 @@
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> <el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" @click.native="rowChange(scope.row)">编辑</el-button> <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true"
<el-button type="text" size="small" @click.stop="true" @click.native="deleteCodeArray(scope.$index, scope.row)">删除</el-button> @click.native="rowChange(scope.row)">编辑
</el-button>
<el-button type="text" size="small" @click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -158,7 +162,7 @@
<script> <script>
import {getBusChange} from "@/api/basic/busTypeChange"; import {getBusChange} from "@/api/basic/busTypeChange";
import {inserThrOrderWeb, updateReceive, updateReceiveDetail,delReceiveDetail} from "@/api/thrsys/thrOrderReceive"; import {inserThrOrderWeb, updateReceive, updateReceiveDetail, delReceiveDetail} from "@/api/thrsys/thrOrderReceive";
import {filterSubByInv, findByFrom, findInvByUser} from "@/api/system/invSubWarehouse"; import {filterSubByInv, findByFrom, findInvByUser} from "@/api/system/invSubWarehouse";
import dialogInvProduct from "../DialogSelectInvProduct"; import dialogInvProduct from "../DialogSelectInvProduct";
import {getOrderDetail} from "@/api/inout/receiveOrder"; import {getOrderDetail} from "@/api/inout/receiveOrder";
@ -195,9 +199,10 @@ export default {
formData: { formData: {
invCode: null, invCode: null,
targetInvCode: null, targetInvCode: null,
billNo: null, billNo: null,
billDate: "", billDate: "",
billType: "", billType: "HCLY",
}, },
formRules: { formRules: {
billDate: [ billDate: [
@ -322,7 +327,6 @@ export default {
} }
} }
} }
if (status === '0') { if (status === '0') {
@ -343,7 +347,7 @@ export default {
type: "warning", type: "warning",
}).then(() => { }).then(() => {
this.submitFunction(status); this.submitFunction(status);
this.loading=false this.loading = false
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
@ -361,22 +365,22 @@ export default {
tQuery.status = status; tQuery.status = status;
tQuery.subErpOrders = this.codeArray; tQuery.subErpOrders = this.codeArray;
tQuery.thirdPartyDate = 2; tQuery.thirdPartyDate = 2;
updateReceive(tQuery) updateReceive(tQuery)
.then(response => { .then(response => {
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success(tMessage + "成功"); this.$message.success(tMessage + "成功");
this.closeDialog(true); this.closeDialog(true);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}) })
}, },
selectProductFunction(event) { selectProductFunction(event) {
if(this.formData.targetInvCode==null){ if (this.formData.targetInvCode == null) {
this.$message.error("往来信息为空!"); this.$message.error("往来信息为空!");
return; return;
} }
@ -387,7 +391,7 @@ export default {
}, },
closeDialogC2(rData) { closeDialogC2(rData) {
this.selectInvProductVisible = false; this.selectInvProductVisible = false;
this.formData.billNo=rData; this.formData.billNo = rData;
this.getOrderDetailList(); this.getOrderDetailList();
}, },
@ -400,12 +404,12 @@ export default {
}, },
tableCountChange(row) { tableCountChange(row) {
if (this.$isNotBlank(row)) { if (this.$isNotBlank(row)) {
updateReceiveDetail(row).then(res=>{ updateReceiveDetail(row).then(res => {
if (res.code==20000){ if (res.code == 20000) {
this.loading = false; this.loading = false;
}else{ } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}) })
} }
@ -439,7 +443,7 @@ export default {
.then(response => { .then(response => {
this.detailLoading = false; this.detailLoading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.getOrderDetailList(); this.getOrderDetailList();
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
@ -489,7 +493,7 @@ export default {
}, },
created() { created() {
if (this.$isNotBlank(this.idQuery.id)) { if (this.$isNotBlank(this.idQuery.id)) {
this.editType=true; this.editType = true;
this.query.limit = 100; this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id; this.query.orderIdFk = this.idQuery.id;
this.formData = this.idQuery.formData; this.formData = this.idQuery.formData;
@ -498,13 +502,13 @@ export default {
this.getOrderDetailList(); this.getOrderDetailList();
} else { } else {
this.editType=false; this.editType = false;
this.formData = { this.formData = {
invCode: this.$store.getters.locInvCode, invCode: this.$store.getters.locInvCode,
targetInvCode: null, targetInvCode: null,
billType: "HCLY",
billNo: null, billNo: null,
billDate: "", billDate: "",
billType: "",
}; };
this.orderEditor = false; this.orderEditor = false;
} }

@ -1,166 +1,174 @@
<template> <template>
<div> <div>
<el-form :model="formData" :rules="formRules" ref="dataForm" label-width="100px"> <el-form :model="formData" :rules="formRules" ref="dataForm" label-width="100px">
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px"> <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px">
<el-button type="primary" @click.native="saveOrder('1')" :loading="loading">草稿保存</el-button> <el-button type="primary" @click.native="saveOrder('1')" :loading="loading">草稿保存</el-button>
<el-button type="primary" @click.native="saveOrder('2')" :loading="loading">提交单据</el-button> <el-button type="primary" @click.native="saveOrder('2')" :loading="loading">提交单据</el-button>
</el-button-group> </el-button-group>
</el-row> </el-row>
<el-card style="margin-top: -5px;"> <el-card style="margin-top: -5px;">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="单据号:" prop="billNo" > <el-form-item label="单据号:" prop="billNo">
<el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input> <el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="单据日期:" prop="billdate"> <el-form-item label="单据日期:" prop="billdate">
<el-date-picker <el-date-picker
v-model="formData.billDate" v-model="formData.billDate"
type="datetime" type="datetime"
placeholder="选择日期" placeholder="选择日期"
style="width: 90%" style="width: 90%"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: -10px"> <el-row style="margin-top: -10px">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="紧急程度:" prop="emergency"> <el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="formData.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable> <el-select v-model="formData.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="普通" :value=1></el-option> <el-option label="普通" :value=1></el-option>
<el-option label="紧急" :value=2></el-option> <el-option label="紧急" :value=2></el-option>
<el-option label="不紧急" :value=3></el-option> <el-option label="不紧急" :value=3></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="到货时间:" prop="arrivalTime"> <el-form-item label="到货时间:" prop="arrivalTime">
<el-date-picker <el-date-picker
v-model="formData.arrivalTime" v-model="formData.arrivalTime"
type="datetime" type="datetime"
placeholder="选择日期" placeholder="选择日期"
style="width: 90%" style="width: 90%"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: -10px"> <el-row style="margin-top: -10px">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="申购科室:" prop="locStorageCode"> <el-form-item label="申购科室:" prop="locStorageCode">
<el-select v-model="formData.targetInvCode" placeholder="当前分库信息" @change="setWarehouseName" style="width: 90%" clearable> <el-select v-model="formData.targetInvCode" placeholder="当前分库信息" @change="setWarehouseName"
<el-option style="width: 90%" clearable>
v-for="item in subInvList" <el-option
:key="item.name" v-for="item in subInvList"
:label="item.name" :key="item.name"
:value="item.code"> :label="item.name"
<span style="float: left">{{ item.name }}</span> :value="item.code">
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-select> </el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="11"> </el-col>
<el-form-item label="申购说明:" prop="billNo"> <el-col :span="11">
<el-input v-model="formData.remark" auto-complete="off" style="width: 90%" type="textarea" autosize></el-input> <el-form-item label="申购说明:" prop="billNo">
</el-form-item> <el-input v-model="formData.remark" auto-complete="off" style="width: 90%" type="textarea"
</el-col> autosize></el-input>
</el-row> </el-form-item>
<el-row style="margin-top: -10px" v-show="formData.status==4"> </el-col>
<el-col :span="11"> </el-row>
<el-form-item label="拒绝原因:"> <el-row style="margin-top: -10px" v-show="formData.status==4">
<el-input v-model="formData.auditRemark" auto-complete="off" style="width: 90%" :disabled="true"></el-input> <el-col :span="11">
</el-form-item> <el-form-item label="拒绝原因:">
</el-col> <el-input v-model="formData.auditRemark" auto-complete="off" style="width: 90%"
</el-row> :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button> <el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button>
<el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button> <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button>
</el-button-group> </el-button-group>
</el-button-group> </el-button-group>
</el-row> </el-row>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border highlight-current-row max-height="300" height="300" ref="multipleTable"> <el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border
<el-table-column label="序号" type="index" width="50"></el-table-column> highlight-current-row max-height="300" height="300" ref="multipleTable">
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> <el-table-column label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column> <el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column>
<el-table-column width="150" label="申购数量"> <el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
<template slot-scope="scope"> <el-table-column width="150" label="申购数量">
<el-input size="small" v-model="scope.row.count" <template slot-scope="scope">
placeholder="请输入数量" style="width: 80%" <el-input size="small" v-model="scope.row.count"
type='number' placeholder="请输入数量" style="width: 80%"
@change="tableCountChange(scope.row)" type='number'
:disabled="scope.row.index !== selectedIndex" @change="tableCountChange(scope.row)"
oninput="value=value.replace(/[^\d]/g,'')"></el-input> :disabled="scope.row.index !== selectedIndex"
</template> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</el-table-column> </template>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column> </el-table-column>
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> <el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column> <el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<template slot-scope="scope"> <el-table-column label="操作" width="120">
<el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" @click.native="rowChange(scope.row)">编辑</el-button> <template slot-scope="scope">
<el-button type="text" size="small" @click.stop="true" @click.native="deleteCodeArray(scope.$index, scope.row)">删除</el-button> <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true"
</template> @click.native="rowChange(scope.row)">编辑
</el-table-column> </el-button>
</el-table> <el-button type="text" size="small" @click.stop="true"
</el-card> @click.native="deleteCodeArray(scope.$index, scope.row)">删除
</el-form> </el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-form>
<el-dialog <el-dialog
title="产品录入" title="产品录入"
:visible.sync="selectProductVisible" :visible.sync="selectProductVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="80%" width="80%"
v-if="selectProductVisible" v-if="selectProductVisible"
:append-to-body='true' :append-to-body='true'
> >
<purApplyProducts <purApplyProducts
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:data="thisData" :data="thisData"
:pId="pId" :pId="pId"
:purType="1" :purType="1"
></purApplyProducts> ></purApplyProducts>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="计划单据选入" title="计划单据选入"
:visible.sync="selectApplyVisible" :visible.sync="selectApplyVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="80%" width="80%"
append-to-body append-to-body
v-if="selectApplyVisible" v-if="selectApplyVisible"
> >
<select-recelve-list-dialog <select-recelve-list-dialog
:data="thisData" :data="thisData"
:pId="pId" :pId="pId"
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
></select-recelve-list-dialog> ></select-recelve-list-dialog>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -179,350 +187,351 @@ import {addPlanId} from "@/api/purchase/purPlan";
import SelectRecelveListDialog from "@/views/inout/receive/selectReveiceListDialog"; import SelectRecelveListDialog from "@/views/inout/receive/selectReveiceListDialog";
export default { export default {
name: "idQuery", name: "idQuery",
props: { props: {
closeDialog: { closeDialog: {
type: Function, type: Function,
required: true, required: true,
},
idQuery: {
type: Object,
required: true,
},
changId: {
type: Boolean,
required: true,
},
isChang: {
type: Function,
required: true,
},
}, },
data() { idQuery: {
return { type: Object,
code: "", required: true,
query: { },
orderIdFk: "", changId: {
page: 1, type: Boolean,
limit: 10, required: true,
},
formData: {
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
invCode: null,
targetInvCode: null,
targetDeptCode: null,
},
pId: null,
formRules: {},
codeArray: [],
total: 0,
loading: false,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
},
typeMap: {
1: "预入库",
2: "普通采购",
},
orderEditor: true,
selectApplyVisible:false,
sOptions: [],
sValue: [],
sList: [],
sLoading: false,
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
thisData: {},
storageList: [],
subInvList: [],
invQueryData: {},
};
}, },
watch: { isChang: {
isChang: function () { type: Function,
this.$emit("cancelDialog", this.pId); required: true,
},
},
components: {
draggable,
purApplyProducts,
SelectRecelveListDialog
}, },
methods: { },
saveOrder(status) { data() {
this.$refs["dataForm"].validate(valid => { return {
if (valid) { code: "",
if (this.codeArray.length < 1) { query: {
this.$message.warning('未添加产品'); orderIdFk: "",
return; page: 1,
} limit: 10,
if (status === '2') { },
formData: {
billType: "CPSG",
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
invCode: null,
targetInvCode: null,
targetDeptCode: null,
},
pId: null,
formRules: {},
codeArray: [],
total: 0,
loading: false,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
},
typeMap: {
1: "预入库",
2: "普通采购",
},
orderEditor: true,
selectApplyVisible: false,
sOptions: [],
sValue: [],
sList: [],
sLoading: false,
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
thisData: {},
storageList: [],
subInvList: [],
invQueryData: {},
if(this.formData.billDate=="" || this.formData.billDate==null){ };
return this.$message.error("单据日期不能为空!"); },
} watch: {
if(this.formData.targetInvCode=="" || this.formData.targetInvCode==null){ isChang: function () {
return this.$message.error("采购科室不能为空!"); this.$emit("cancelDialog", this.pId);
} },
if(this.formData.emergency=="" || this.formData.emergency==null){ },
return this.$message.error("紧急程度不能为空!"); components: {
} draggable,
if(this.formData.arrivalTime=="" || this.formData.arrivalTime==null){ purApplyProducts,
return this.$message.error("到货时间不能为空!"); SelectRecelveListDialog
} },
methods: {
saveOrder(status) {
this.$refs["dataForm"].validate(valid => {
if (valid) {
if (this.codeArray.length < 1) {
this.$message.warning('未添加产品');
return;
}
if (status === '2') {
for (let i = 0; i < this.codeArray.length; i++) { if (this.formData.billDate == "" || this.formData.billDate == null) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { return this.$message.error("单据日期不能为空!");
return this.$message.error('单据数量不能为0');
}
}
}
if (status == "1") {
this.submitFunction(status);
} else {
let tip = "是否确定提交订单?";
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
}).catch(() => {
this.loading = false;
});
}
}
});
},
submitFunction(status) {
let tMessage = status === '1' ? '保存' : '提交';
this.loading = true;
this.formData.id=this.pId;
this.formData.invCode=this.$store.getters.locInvCode
this.formData.deptCode=this.$store.getters.locDeptCode
let tQuery = {
type:1,
editStatus: status,
purApplyEntity: this.formData,
subErpOrders: this.codeArray,
}
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
setWarehouseName(obj){
this.formData.targetDeptCode= this.subInvList.find(item => item.code == obj).parentId;
},
selectProductFunction() {
this.selectProductVisible = true;
//idid
if(this.pId==null){
addApplyId().then(response => {
if (response.code === 20000) {
this.pId=response.data
}
}).catch(() => {
this.loading = false;
})
} }
this.thisData.stockOrderLists = this.codeArray; if (this.formData.targetInvCode == "" || this.formData.targetInvCode == null) {
}, return this.$message.error("采购科室不能为空!");
closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectApplyVisible = false;
this.query={
orderIdFk:rData
} }
this.pId=rData; if (this.formData.emergency == "" || this.formData.emergency == null) {
listApplyDetail(this.query) // return this.$message.error("紧急程度不能为空!");
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
},
tableCountChange(row) {
if (this.$isNotBlank(row)) {
updateDetail(this.currentRow);
} }
}, if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) {
tableRowClassName({row, rowIndex}) { return this.$message.error("到货时间不能为空!");
row.index = rowIndex;
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
this.$refs["dataForm"].resetFields();
this.getList();
} }
},
selectApply() { for (let i = 0; i < this.codeArray.length; i++) {
this.selectApplyVisible = true; if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
//idid return this.$message.error('单据数量不能为0');
if(this.pId==null){ }
addApplyId().then(response => {
if (response.code === 20000) {
this.pId=response.data
} }
}).catch(() => { }
this.loading = false; if (status == "1") {
}) this.submitFunction(status);
} } else {
}, let tip = "是否确定提交订单?";
deleteCodeArray(index, row) { this.$confirm(tip, "提示", {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { confirmButtonText: "确定",
confirmButtonText: "确定", cancelButtonText: "取消",
cancelButtonText: "取消", type: "warning",
type: "warning",
}).then(() => { }).then(() => {
this.$refs.multipleTable.setCurrentRow(); this.submitFunction(status);
this.currentRow = {};
this.selectedIndex = "";
if (this.orderEditor) {
this.detailLoading = true;
if (this.$isNotBlank(row.id)) {
delApplyDetail(row.id)
.then(response => {
this.detailLoading = false;
if (response.code === 20000) {
this.$message.success(response.data);
// this.getStockOrderDetailList();
this.codeArray.splice(index, 1);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.detailLoading = false;
})
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
}).catch(() => { }).catch(() => {
this.loading = false;
}); });
}, }
getStockOrderDetailList() { }
this.loading = true; });
listApplyDetail(this.query) // },
.then((response) => { submitFunction(status) {
console.log(response) let tMessage = status === '1' ? '保存' : '提交';
this.codeArray = response.data.list || []; this.loading = true;
this.total = response.data.total || 0; this.formData.id = this.pId;
this.loading = false; this.formData.invCode = this.$store.getters.locInvCode
}) this.formData.deptCode = this.$store.getters.locDeptCode
.catch(() => { let tQuery = {
this.loading = false; type: 1,
this.list = []; editStatus: status,
this.total = 0; purApplyEntity: this.formData,
}); subErpOrders: this.codeArray,
}, }
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
findSubInvs() { if (response.code === 20000) {
this.subInvList = []; this.$message.success(tMessage + "成功");
let query = { this.closeDialog(true);
filter:3 } else {
}; this.$message.error(response.message);
filterSubByInv(query) }
.then((response) => { })
this.subInvList = response.data || []; .catch(() => {
if (this.subInvList != null && this.subInvList.length == 1) { this.loading = false;
this.formData.invWarehouseCode = this.subInvList[0].code; })
} },
}) setWarehouseName(obj) {
.catch(() => { this.formData.targetDeptCode = this.subInvList.find(item => item.code == obj).parentId;
}); },
}, selectProductFunction() {
this.selectProductVisible = true;
//idid
if (this.pId == null) {
addApplyId().then(response => {
if (response.code === 20000) {
this.pId = response.data
}
}).catch(() => {
this.loading = false;
})
}
this.thisData.stockOrderLists = this.codeArray;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectApplyVisible = false;
this.query = {
orderIdFk: rData
}
this.pId = rData;
listApplyDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
}, },
filters: {}, tableCountChange(row) {
mounted() { if (this.$isNotBlank(row)) {
document.body.ondrop = function (event) { updateDetail(this.currentRow);
event.preventDefault(); }
event.stopPropagation(); },
}; tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
this.$refs["dataForm"].resetFields();
this.getList();
}
},
selectApply() {
this.selectApplyVisible = true;
//idid
if (this.pId == null) {
addApplyId().then(response => {
if (response.code === 20000) {
this.pId = response.data
}
}).catch(() => {
this.loading = false;
})
}
}, },
created() { deleteCodeArray(index, row) {
if (this.$isNotBlank(this.idQuery.id)) { this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
this.query.limit = 100; confirmButtonText: "确定",
this.pId=this.idQuery.id; cancelButtonText: "取消",
this.query.orderIdFk = this.idQuery.id; type: "warning",
this.formData = this.idQuery.formData; }).then(() => {
this.orderEditor = true; this.$refs.multipleTable.setCurrentRow();
this.sValue = this.formData.corpName; this.currentRow = {};
this.getStockOrderDetailList(); this.selectedIndex = "";
if (this.orderEditor) {
this.detailLoading = true;
if (this.$isNotBlank(row.id)) {
delApplyDetail(row.id)
.then(response => {
this.detailLoading = false;
if (response.code === 20000) {
this.$message.success(response.data);
// this.getStockOrderDetailList();
this.codeArray.splice(index, 1);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.detailLoading = false;
})
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
} else { } else {
this.formData = { this.$message.success('删除成功');
id: null, this.codeArray.splice(index, 1);
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
};
this.orderEditor = false;
} }
this.findSubInvs(); }).catch(() => {
this.codeArray = [];
});
},
getStockOrderDetailList() {
this.loading = true;
listApplyDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
findSubInvs() {
this.subInvList = [];
let query = {
filter: 3
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
}, },
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.pId = this.idQuery.id;
this.query.orderIdFk = this.idQuery.id;
this.formData = this.idQuery.formData;
this.orderEditor = true;
this.sValue = this.formData.corpName;
this.getStockOrderDetailList();
} else {
this.formData = {
id: null,
billNo: null,
billDate: "",
remark: "",
billType: "CPSG",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
};
this.orderEditor = false;
}
this.findSubInvs();
this.codeArray = [];
},
}; };
</script> </script>
<style> <style>
.ao-text { .ao-text {
width: 100%; width: 100%;
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
float: right; float: right;
text-align: right; text-align: right;
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

@ -212,6 +212,7 @@ export default {
billNo: null, billNo: null,
billDate: "", billDate: "",
remark: "", remark: "",
billType: "CGDD",
deptCode: null, deptCode: null,
locStorageCode: null, locStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
@ -281,10 +282,10 @@ export default {
if (this.formData.invCode == "" || this.formData.invCode == null) { if (this.formData.invCode == "" || this.formData.invCode == null) {
return this.$message.error("采购仓库不能为空!"); return this.$message.error("采购仓库不能为空!");
} }
if(this.formData.emergency=="" || this.formData.emergency==null){ if (this.formData.emergency == "" || this.formData.emergency == null) {
return this.$message.error("紧急程度不能为空!"); return this.$message.error("紧急程度不能为空!");
} }
if(this.formData.arrivalTime=="" || this.formData.arrivalTime==null){ if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) {
return this.$message.error("到货时间不能为空!"); return this.$message.error("到货时间不能为空!");
} }
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
@ -500,6 +501,7 @@ export default {
billNo: null, billNo: null,
billDate: "", billDate: "",
remark: "", remark: "",
billType: "CGDD",
deptCode: null, deptCode: null,
incCode: null, incCode: null,
}; };

@ -212,6 +212,7 @@ export default {
billNo: null, billNo: null,
billDate: "", billDate: "",
remark: "", remark: "",
billType: "CGJH",
deptCode: null, deptCode: null,
locStorageCode: null, locStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
@ -281,10 +282,10 @@ export default {
if (this.formData.invCode == "" || this.formData.invCode == null) { if (this.formData.invCode == "" || this.formData.invCode == null) {
return this.$message.error("采购仓库不能为空!"); return this.$message.error("采购仓库不能为空!");
} }
if(this.formData.emergency=="" || this.formData.emergency==null){ if (this.formData.emergency == "" || this.formData.emergency == null) {
return this.$message.error("紧急程度不能为空!"); return this.$message.error("紧急程度不能为空!");
} }
if(this.formData.arrivalTime=="" || this.formData.arrivalTime==null){ if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) {
return this.$message.error("到货时间不能为空!"); return this.$message.error("到货时间不能为空!");
} }
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
@ -499,6 +500,7 @@ export default {
billNo: null, billNo: null,
billDate: "", billDate: "",
remark: "", remark: "",
billType: "CGJH",
deptCode: null, deptCode: null,
incCode: null, incCode: null,
}; };

@ -98,20 +98,19 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <!-- <el-descriptions-item>-->
<template slot="label"> <!-- <template slot="label">-->
运行参数 <!-- 运行参数-->
</template> <!-- </template>-->
<el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable"> <!-- <el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable">-->
</el-checkbox> <!-- </el-checkbox>-->
</el-descriptions-item> <!-- </el-descriptions-item>-->
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
单据类型 单据类型
</template> </template>
<el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable"></el-checkbox> <el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable"></el-checkbox>
</el-checkbox>
<el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
</el-descriptions-item> </el-descriptions-item>
@ -120,10 +119,11 @@
<template slot="label"> <template slot="label">
基础信息 基础信息
</template> </template>
<el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable"> <!-- <el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable">-->
</el-checkbox> <!-- </el-checkbox>-->
<el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable"> <!-- <el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable">-->
</el-checkbox> <!-- </el-checkbox>-->
<el-checkbox v-model="configQuery.basicDept" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable"></el-checkbox> <el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable"></el-checkbox> <el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable"></el-checkbox>
</el-descriptions-item> </el-descriptions-item>
@ -148,17 +148,17 @@
<!-- <el-checkbox v-model="configQuery.dbDiProducts">DI</el-checkbox>--> <!-- <el-checkbox v-model="configQuery.dbDiProducts">DI</el-checkbox>-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<el-descriptions-item> <!-- <el-descriptions-item>-->
<template slot="label"> <!-- <template slot="label">-->
首营资质证书 <!-- 首营资质证书-->
</template> <!-- </template>-->
<el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable"> <!-- <el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable">-->
</el-checkbox> <!-- </el-checkbox>-->
<el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable"> <!-- <el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable">-->
</el-checkbox> <!-- </el-checkbox>-->
<el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable"> <!-- <el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable">-->
</el-checkbox> <!-- </el-checkbox>-->
</el-descriptions-item> <!-- </el-descriptions-item>-->
</el-descriptions> </el-descriptions>
<el-descriptions class="margin-top" title="上传至UDI自助平台扫码单据" :column="1" :size="100" <el-descriptions class="margin-top" title="上传至UDI自助平台扫码单据" :column="1" :size="100"
@ -250,10 +250,9 @@
<el-table-column width="250" label="单据状态"> <el-table-column width="250" label="单据状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.orderStatus" placeholder="请选择单据状态"> <el-select v-model="scope.row.orderStatus" placeholder="请选择单据状态">
<el-option label="待校验" :value=3>待校验</el-option> <el-option label="待校验" :value=1>草稿</el-option>
<el-option label="待核对" :value=5>待核对</el-option> <el-option label="待核对" :value=2>未审核</el-option>
<el-option label="待审核" :value=10>待审核</el-option> <el-option label="待审核" :value=3>已审核</el-option>
<el-option label="已审核" :value=7>已审核</el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -395,7 +394,7 @@ export default {
companyCert: null, companyCert: null,
manufacturerCert: null, manufacturerCert: null,
productCert: null, productCert: null,
basicDept: null,
}, },
checkedBusTypes: [], checkedBusTypes: [],

Loading…
Cancel
Save