diff --git a/src/api/inventory/invPorduct.js b/src/api/inventory/invPorduct.js index 70a293a1..426c85b9 100644 --- a/src/api/inventory/invPorduct.js +++ b/src/api/inventory/invPorduct.js @@ -8,6 +8,14 @@ export function getInvProduct(params) { }); } +export function getInvProductStock(params) { + return axios({ + url: "/spms/inv/product/filterStock", + method: "get", + params: params + }); +} + export function getProduct(params) { return axios({ url: "/spms/inv/product/filterProduct", diff --git a/src/api/inventory/invPreInSearch.js b/src/api/inventory/invPreInSearch.js index 68579ffe..57da8472 100644 --- a/src/api/inventory/invPreInSearch.js +++ b/src/api/inventory/invPreInSearch.js @@ -34,6 +34,14 @@ export function getInvPreInProduct(params) { }); } +export function getInvPreInProductStock(params) { + return axios({ + url: "/spms/inv/pre/in/product/filterStock", + method: "get", + params: params + }); +} + export function getInvPreInProductDetail(params) { return axios({ url: "/spms/inv/pre/in/product/filterDetail", diff --git a/src/api/inventory/invPreProduct.js b/src/api/inventory/invPreProduct.js index ef3ae5ef..d9ebb7d5 100644 --- a/src/api/inventory/invPreProduct.js +++ b/src/api/inventory/invPreProduct.js @@ -8,6 +8,16 @@ export function getInvPreProduct(params) { }); } +export function getInvPreProductStock(params) { + return axios({ + url: "/spms/inv/pre/product/filterStock", + method: "get", + params: params + }); +} + + + export function getInvPreProductDetail(params) { return axios({ url: "/spms/inv/pre/product/filterDetail", diff --git a/src/views/inout/DialogSelectInvProduct.vue b/src/views/inout/DialogSelectInvProduct.vue index 4212da93..7cf3c644 100644 --- a/src/views/inout/DialogSelectInvProduct.vue +++ b/src/views/inout/DialogSelectInvProduct.vue @@ -66,12 +66,12 @@ <script> import { - getInvProduct, + getInvProduct, getInvProductStock, } from "@/api/inventory/invPorduct"; import {addDetail} from "@/api/inout/receiveOrder"; import {addBizProduct} from "@/api/inout/orderDetailCode"; -import {getInvPreInProduct} from "@/api/inventory/invPreInSearch"; -import {getInvPreProduct} from "@/api/inventory/invPreProduct"; +import {getInvPreInProduct, getInvPreInProductStock} from "@/api/inventory/invPreInSearch"; +import {getInvPreProduct, getInvPreProductStock} from "@/api/inventory/invPreProduct"; export default { @@ -172,7 +172,7 @@ export default { this.loading = true; //寄售 if(this.invQueryData.advanceType==3){ - getInvPreProduct(this.filterQuery) + getInvPreProductStock(this.filterQuery) .then((response) => { this.showSup = response.data.showSup; this.loading = false; @@ -186,7 +186,7 @@ export default { }); //预验收 }else if(this.invQueryData.advanceType==2){ - getInvPreInProduct(this.filterQuery) + getInvPreInProductStock(this.filterQuery) .then((response) => { this.showSup = response.data.showSup; this.loading = false; @@ -200,7 +200,7 @@ export default { }); }else{ - getInvProduct(this.filterQuery) + getInvProductStock(this.filterQuery) .then((response) => { this.showSup = response.data.showSup; this.loading = false; diff --git a/src/views/inout/receive/DialogNewReceive.vue b/src/views/inout/receive/DialogNewReceive.vue index 53b7ebef..18efb91d 100644 --- a/src/views/inout/receive/DialogNewReceive.vue +++ b/src/views/inout/receive/DialogNewReceive.vue @@ -44,9 +44,10 @@ <el-row :gutter="20"> <el-col :span="11"> - <el-form-item prop="invCode" label="领用仓库:"> + <el-form-item prop="invCode" label="当前仓库:"> <el-select v-model="formData.invCode" @change="subStorageChange" placeholder="当前仓库信息" style="width: 100%;" + :disabled="codeArray.length>0" clearable> <el-option v-for="item in invList" @@ -58,9 +59,10 @@ </el-form-item> </el-col> <el-col :span="11"> - <el-form-item class="query-form-item" prop="targetInvCode" label="往来信息:"> - <el-select v-model="formData.targetInvCode" placeholder="请选择往来信息" @change="getTargerType" + <el-form-item class="query-form-item" prop="targetInvCode" label="领用仓库:"> + <el-select v-model="formData.targetInvCode" placeholder="请选择领用仓库" @change="getTargerType" clearable="true" + :disabled="codeArray.length>0" style="width: 100%" > <el-option @@ -138,6 +140,9 @@ <el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="操作" width="150"> <template slot-scope="scope"> + <el-button type="text" size="small" :disabled="!ischeck" @click.stop="true" + @click.native="save(scope.row)">保存 + </el-button> <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" @click.native="rowChange(scope.row)">编辑 </el-button> @@ -259,7 +264,8 @@ export default { storageList: [], invQueryData: {}, type: 1, - + Receive: {}, + ischeck:false, }; }, components: { @@ -410,16 +416,11 @@ export default { this.getOrderDetailList(); }, - rowChange(val) { - this.currentRow = val; - this.selectedIndex = val.index; - this.iCount = val.count; - this.focusNext('iCount'); - - }, - tableCountChange(row) { - if (this.$isNotBlank(row)) { - updateReceiveDetail(row).then(res => { + save(){ + if (this.$isNotBlank(this.Receive)) { + this.Receive.targetInvCode = this.formData.targetInvCode + this.Receive.advanceType = this.formData.advanceType + updateReceiveDetail(this.Receive).then(res => { if (res.code == 20000) { this.loading = false; } else { @@ -429,6 +430,16 @@ export default { }) } }, + rowChange(val) { + this.ischeck = true; + this.currentRow = val; + this.selectedIndex = val.index; + this.iCount = val.count; + this.focusNext('iCount'); + }, + tableCountChange(row) { + this.Receive = row; + }, tableRowClassName({row, rowIndex}) { row.index = rowIndex; }, diff --git a/src/views/inout/receive/receiveAudit.vue b/src/views/inout/receive/receiveAudit.vue index ffc5ac36..e3354bc7 100644 --- a/src/views/inout/receive/receiveAudit.vue +++ b/src/views/inout/receive/receiveAudit.vue @@ -9,7 +9,7 @@ </el-form-item> </el-col> <el-col :span="8"> - <el-form-item label="领用仓库:"> + <el-form-item label="当前仓库:"> <el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;"> <el-option v-for="item in invList" @@ -21,23 +21,39 @@ </el-form-item> </el-col> <el-col :span="8"> - <el-form-item label="往来信息:"> - <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息" - filterable - remote - reserve-keyword - :remote-method="finCorpList" - :loading="loading" - style="width: 100%;"> - <el-option - v-for="item in corpList" - :key="item.code" - :label="item.name" - :value="item.name"> - </el-option> - </el-select> + <el-form-item label="创建时间:"> + <el-date-picker + style="width: 90%" + :picker-options="pickerOptions" + v-model="actDateRange" + type="daterange" + format="yyyy 年 MM 月 dd 日" + value-format="yyyy-MM-dd" + range-separator="至" + start-placeholder="开始日期" + end-placeholder="结束日期" + > + </el-date-picker> </el-form-item> </el-col> + <!--<el-col :span="8">--> + <!-- <el-form-item label="往来信息:">--> + <!-- <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"--> + <!-- filterable--> + <!-- remote--> + <!-- reserve-keyword--> + <!-- :remote-method="finCorpList"--> + <!-- :loading="loading"--> + <!-- style="width: 100%;">--> + <!-- <el-option--> + <!-- v-for="item in corpList"--> + <!-- :key="item.code"--> + <!-- :label="item.name"--> + <!-- :value="item.name">--> + <!-- </el-option>--> + <!-- </el-select>--> + <!-- </el-form-item>--> + <!--</el-col>--> <!-- <el-col :span="6">--> <!-- <el-form-item label="领用类型:">--> <!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">--> @@ -55,24 +71,7 @@ <!-- </el-form-item>--> <!-- </el-col>--> </el-row> - <el-row> - <el-col :span="8"> - <el-form-item label="创建时间:"> - <el-date-picker - style="width: 90%" - :picker-options="pickerOptions" - v-model="actDateRange" - type="daterange" - format="yyyy 年 MM 月 dd 日" - value-format="yyyy-MM-dd" - range-separator="至" - start-placeholder="开始日期" - end-placeholder="结束日期" - > - </el-date-picker> - </el-form-item> - </el-col> - </el-row> + </el-form> <div class="top-right-btn"> @@ -90,8 +89,8 @@ <el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="领用单号" prop="billNo"></el-table-column> <el-table-column label="领用部门" prop="deptName"></el-table-column> - <el-table-column label="领用仓库" prop="invName"></el-table-column> - <el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column> + <el-table-column label="当前仓库" prop="invName"></el-table-column> + <!--<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>--> <el-table-column label="单据状态" prop="status"> <template slot-scope="scope"> <el-tag :type="(scope.row.status)"> @@ -165,7 +164,7 @@ export default { thirdSysFk: "", page: 1, limit: 10, - corpName: null, + corpName: this.$store.getters.locInvName, invCode: '', type: 2, editStatus: 2,