diff --git a/.env.production b/.env.production index 75f161be..1c85c14e 100644 --- a/.env.production +++ b/.env.production @@ -65,8 +65,8 @@ ENV = 'production' # VUE_APP_BASE_API = 'http://192.168.0.67:9150/UDI_WMS_MC/' # 东山 -VUE_APP_BASE_API = 'http://https://mudi.dsxyy.org/UDI_WMS_MC/' - +# VUE_APP_BASE_API = 'http://https://mudi.dsxyy.org/UDI_WMS_MC/' +VUE_APP_BASE_API = 'http://192.168.10.225:9150/UDI_WMS_MC/' # 应用访问路径 例如使用前缀 /admin/ VUE_APP_CONTEXT_PATH = '/UDI_WMS_NEW/' diff --git a/src/views/purchase/purApply/purApply.vue b/src/views/purchase/purApply/purApply.vue index 34a7bafa..2e6ad729 100644 --- a/src/views/purchase/purApply/purApply.vue +++ b/src/views/purchase/purApply/purApply.vue @@ -120,7 +120,7 @@ <el-table-column label="备注" prop="remark"></el-table-column> <el-table-column label="创建时间" prop="createTime" sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> - <el-table-column label="操作" width="120px"> + <el-table-column label="操作" width="120"> <template slot-scope="scope"> <el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑 </el-button> @@ -299,7 +299,7 @@ export default { }, getId(id) { if (this.formName == 'add' && id != null) { - var data = { + let data = { id: id } this.pId = id @@ -312,7 +312,6 @@ export default { } else { this.newSpDistributionVisible = false } - }, onSubmitFind() { this.filterQuery.page = 1; diff --git a/src/views/purchase/purApply/purApplyEditDiaolog.vue b/src/views/purchase/purApply/purApplyEditDiaolog.vue index 491f4517..4485f5b8 100644 --- a/src/views/purchase/purApply/purApplyEditDiaolog.vue +++ b/src/views/purchase/purApply/purApplyEditDiaolog.vue @@ -106,12 +106,12 @@ <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-column label="序号" type="index" width="60"></el-table-column> - <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column> - <el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column> - <el-table-column label="商品名称" prop="spmc" show-overflow-tooltip="true"></el-table-column> - <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> - <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column> - <el-table-column width="150" label="申购数量"> + <el-table-column label="DI/物资编码" prop="nameCode" width="120"></el-table-column> + <el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true" width="140"></el-table-column> + <el-table-column label="商品名称" prop="spmc" show-overflow-tooltip="true" width="110"></el-table-column> + <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true" width="140"></el-table-column> + <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="80"></el-table-column> + <el-table-column width="110" label="申购数量"> <template slot-scope="scope"> <el-input size="small" v-model="scope.row.count" placeholder="请输入数量" style="width: 80%" @@ -120,10 +120,10 @@ oninput="value=value.replace(/[^\d]/g,'')"></el-input> </template> </el-table-column> - <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column> - <el-table-column label="生产厂家" prop="manufactory"></el-table-column> - <el-table-column label="供应商" prop="supName"></el-table-column> - <el-table-column label="操作" width="120"> + <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="140"></el-table-column> + <el-table-column label="生产厂家" prop="manufactory" width="140"></el-table-column> + <el-table-column label="供应商" prop="supName" width="140"></el-table-column> + <el-table-column label="操作" width="120" fixed="right"> <template slot-scope="scope"> <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" @click.native="rowChange(scope.row)">编辑 @@ -212,6 +212,10 @@ export default { type: Function, required: true, }, + isRepeat: { + type: Boolean, + required: true, + }, }, data() { return { @@ -514,6 +518,29 @@ export default { }); }, + getDetailByRepeat(value) { + this.query = { + orderIdFk: value + } + listApplyDetail(this.query) //查找该单号下的所有条码 + .then((response) => { + this.codeArray = response.data.list || []; + this.total = response.data.total || 0; + this.loading = false; + this.codeArray.forEach(item => { + item.orderIdFk = value + }) + + }) + .catch(() => { + this.loading = false; + this.list = []; + this.total = 0; + }); + + } + + }, filters: {}, mounted() { @@ -523,21 +550,7 @@ export default { }; }, created() { - this.$nextTick(res => { - //当父id为空的时候生成id - if (this.pId == null) { - addApplyId().then(response => { - if (response.code === 20000) { - this.pId = response.data - console.log("最初生成id:") - console.log(this.pId) - } - }).catch(() => { - this.loading = false; - }) - } - }) - + debugger if (this.$isNotBlank(this.idQuery.id)) { this.query.limit = 100; this.pId = this.idQuery.id; @@ -547,25 +560,64 @@ export default { this.sValue = this.formData.corpName; this.getStockOrderDetailList(); } else { - var date = new Date(); - this.formData = { - id: null, - billNo: null, - remark: "", - deptCode: null, - locStorageCode: null, - invWarehouseCode: null, - createTime: parseTime( + let date = new Date(); + if (this.isRepeat) { + this.formData = this.idQuery.formData + let orderId = this.idQuery.formData.id; + this.createTime = parseTime( date, "{y}-{m}-{d} {h}:{i}:{s}" - ), - }; - this.orderEditor = false; + ) + this.formData.billNo = null + addApplyId().then(response => { + if (response.code === 20000) { + this.pId = response.data + this.formData.id = this.pId + this.$nextTick(res => { + this.getDetailByRepeat(orderId) + }); + + } + }).catch(() => { + this.loading = false; + }) + } else { + this.formData = { + id: null, + billNo: null, + remark: "", + deptCode: null, + locStorageCode: null, + invWarehouseCode: null, + createTime: parseTime( + date, + "{y}-{m}-{d} {h}:{i}:{s}" + ), + }; + this.orderEditor = false; + this.$nextTick(res => { + //当父id为空的时候生成id + if (this.pId == null) { + addApplyId().then(response => { + if (response.code === 20000) { + this.pId = response.data + this.formData.id = this.pId + } + }).catch(() => { + this.loading = false; + }) + } + }) + } + + } this.findSubInvs(); this.codeArray = []; - }, -}; + } + , +} +; </script> <style scoped> diff --git a/src/views/purchase/purApply/pureApplyMySearch.vue b/src/views/purchase/purApply/pureApplyMySearch.vue index 9f097012..f4ceee60 100644 --- a/src/views/purchase/purApply/pureApplyMySearch.vue +++ b/src/views/purchase/purApply/pureApplyMySearch.vue @@ -134,9 +134,10 @@ </template> </el-table-column> - <el-table-column label="操作" width="90"> + <el-table-column label="操作" width="160"> <template slot-scope="scope"> <el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">打印</el-button> + <el-button type="text" size="small" @click.native.stop="repeatOrder(scope.row)">再次申购</el-button> <el-button type="text" @click.native.stop="deleteDialog(scope.row)">删除</el-button> </template> </el-table-column> @@ -181,11 +182,40 @@ :editType="editType" ></pureApplyDetail> </el-dialog> + + <el-dialog + title="编辑申购单" + :visible.sync="pureApplyEditVisible" + width="80%" + v-if="pureApplyEditVisible" + @close='closeDialog' + :close-on-click-modal="false" + :close-on-press-escape="false" + > + <pureApplyEdit + :closeDialog="closeDialog" + :idQuery="idQuery" + v-on:cancelDialog="getId" + :isRepeat=true + ></pureApplyEdit> + </el-dialog> + + </div> </template> <script> import pureApplyDetail from "./pureApplyDetailDialog"; -import {delApply, auditOrder, listApplyDetail, auditListApply, listApply, printOrder} from "@/api/purchase/purApply"; +import pureApplyEdit from "./purApplyEditDiaolog"; + +import { + delApply, + auditOrder, + listApplyDetail, + auditListApply, + listApply, + printOrder, + delApplyDetailAll +} from "@/api/purchase/purApply"; import {getInvListByUser} from "@/api/system/invWarehouse"; import {filterDepts, getDeptListByUser} from "@/api/auth/authDept"; import {filterSubAll} from "@/api/system/invSubWarehouse"; @@ -273,7 +303,6 @@ export default { }, ], }, - pickerAuditOptions: { shortcuts: [ { @@ -305,6 +334,9 @@ export default { }, ], }, + + + pureApplyEditVisible: false, }; }, @@ -479,6 +511,15 @@ export default { this.formName = "add"; this.newSpDistributionVisible = true; }, + + + repeatOrder(row) { + this.idQuery.id = ''; + this.idQuery.formData = row; + this.pureApplyEditVisible = true; + }, + + getInvList() { var query = { parentId: this.filterQuery.targetDeptCode @@ -518,10 +559,24 @@ export default { }); }, + + getId(id) { + this.newSpDistributionVisible = false + let data = { + id: id + } + this.pId = id + delApplyDetailAll(data).then((response) => { + if (response.code == 20000) { + this.newSpDistributionVisible = false + this.pureApplyEditVisible = false; + } + }); + }, } , components: { - pureApplyDetail, + pureApplyDetail, pureApplyEdit } , filters: {