|
@@ -7,38 +7,37 @@
|
|
|
<el-input v-model="goodsInventoryAddForm.sn" :disabled="true"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="盘点时间" prop="inventory_time" class="change-form-item">
|
|
|
- <span v-if="id">{{ goodsInventoryAddForm.inventory_time }}</span>
|
|
|
- <el-date-picker v-else v-model="goodsInventoryAddForm.inventory_time" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
|
|
|
- :disabled="type === 'detail' || type === 'audit' || type==='check'" placeholder="选择日期时间">
|
|
|
+ <span v-if="id">{{ goodsInventoryAddForm.inventory_time }}</span>
|
|
|
+ <el-date-picker v-else v-model="goodsInventoryAddForm.inventory_time" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ type="datetime" :disabled="type === 'detail' || type === 'audit' || type === 'check'" placeholder="选择日期时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="仓库" prop="warehouse_id" class="change-form-item">
|
|
|
- <span v-if="id">{{ getWarehouse(goodsInventoryAddForm.warehouse_id) }}</span>
|
|
|
+ <span v-if="id">{{ getWarehouse(goodsInventoryAddForm.warehouse_id) }}</span>
|
|
|
<el-select v-else v-model="goodsInventoryAddForm.warehouse_id" @change="handleChangeWareHouse"
|
|
|
- :disabled="type === 'detail' || type === 'audit' || type==='check'">
|
|
|
+ :disabled="type === 'detail' || type === 'audit' || type === 'check'">
|
|
|
<el-option v-for="item in warehouseList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="盘点人" prop="inventory_person_id" class="change-form-item">
|
|
|
- <span v-if="id">{{ getadminList(goodsInventoryAddForm.inventory_person_id) }}</span>
|
|
|
- <el-select v-else @change="forceUpdate" v-model="goodsInventoryAddForm.inventory_person_id" :disabled="type === 'detail' || type === 'audit' || type==='check'">
|
|
|
+ <span v-if="id">{{ getadminList(goodsInventoryAddForm.inventory_person_id) }}</span>
|
|
|
+ <el-select v-else @change="forceUpdate" v-model="goodsInventoryAddForm.inventory_person_id"
|
|
|
+ :disabled="type === 'detail' || type === 'audit' || type === 'check'">
|
|
|
<el-option v-for="item in adminList" :key="item.id" :label="item.real_name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="制单人" prop="creator_id" class="change-form-item">
|
|
|
- <span v-if="id">{{ getadminList(goodsInventoryAddForm.creator_id) }}</span>
|
|
|
- <el-select v-else
|
|
|
- v-model="goodsInventoryAddForm.creator_id"
|
|
|
- :disabled="type === 'detail' || type === 'audit' || type==='check'"
|
|
|
- @change="forceUpdate">
|
|
|
+ <span v-if="id">{{ getadminList(goodsInventoryAddForm.creator_id) }}</span>
|
|
|
+ <el-select v-else v-model="goodsInventoryAddForm.creator_id"
|
|
|
+ :disabled="type === 'detail' || type === 'audit' || type === 'check'" @change="forceUpdate">
|
|
|
<el-option v-for="item in adminList" :key="item.id" :label="item.real_name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="盘点类型" prop="inventory_type" class="change-form-item">
|
|
|
- <span v-if="id">{{ getRoleSplit(goodsInventoryAddForm.inventory_type) }}</span>
|
|
|
- <el-select v-else v-model="goodsInventoryAddForm.inventory_type" @change="handleChangeWareHouse"
|
|
|
- :disabled="type === 'detail' || type === 'audit' || type==='check'">
|
|
|
- <el-option v-for="item in typeList" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
+ <span v-if="id">{{ getRoleSplit(goodsInventoryAddForm.inventory_type) }}</span>
|
|
|
+ <el-select v-else v-model="goodsInventoryAddForm.inventory_type" @change="handleChangeInventoryType($event)"
|
|
|
+ :disabled="type === 'detail' || type === 'audit' || type === 'check'">
|
|
|
+ <el-option v-for="item in typeList" :key="item.id" :label="item.label" :value="item" />
|
|
|
</el-select>
|
|
|
<!-- <el-cascader v-model="goodsInventoryAddForm.dept_id" :options="deptList"
|
|
|
:disabled="type === 'detail' || type === 'audit' || type==='check'" :props="{
|
|
@@ -50,8 +49,10 @@
|
|
|
</el-form-item>
|
|
|
<div class="mx">
|
|
|
<h3>商品明细</h3>
|
|
|
- <el-button class="button" size="mini" type="primary" v-if="type !== 'detail' && type!=='check'"
|
|
|
- @click="handleSelectWarehouseEntryBatch">选择</el-button>
|
|
|
+ <el-button class="button" size="mini" type="primary" v-if="type !== 'detail' && type !== 'check'"
|
|
|
+ @click="scanCode">扫码入库</el-button>
|
|
|
+ <el-button class="button" size="mini" type="primary" v-if="type !== 'detail' && type !== 'check'"
|
|
|
+ @click="handleSelectWarehouseEntryBatch" :disabled="selectBtn">选择</el-button>
|
|
|
</div>
|
|
|
<div style="width: 100%; display: block;">
|
|
|
<el-form-item style="width: 100%;">
|
|
@@ -72,13 +73,16 @@
|
|
|
<el-table-column label="sku">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="!id"> {{ scope.row.product_vo.sku }}</span>
|
|
|
- <span v-else> {{ scope.row.product_vo.sku }}</span>
|
|
|
+ <span v-else> {{ scope.row.product_vo.sku }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="序列号">
|
|
|
+ <el-table-column label="序列号" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="!id"> {{ scope.row.product_vo.sn_code }}</span>
|
|
|
- <span v-else> {{ scope.row.product_vo.sn_code }}</span>
|
|
|
+ <div class="sn-code-container">
|
|
|
+ <span v-for="item in scope.row.sn_code_list" :key="item.id">
|
|
|
+ <p>{{ item.sn_code }}</p>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="product_vo.spec_name" label="规格型号">
|
|
@@ -90,23 +94,24 @@
|
|
|
<el-table-column label="单位">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="!id"> {{ scope.row.product_vo.unit }}</span>
|
|
|
- <span v-else> {{ scope.row.product_vo.unit }}</span>
|
|
|
+ <span v-else> {{ scope.row.product_vo.unit }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="库存数量">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.usable_stock }}
|
|
|
+ {{ scope.row.actual_stock }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="盘点数量">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.inventory_num" type="number" :min="0" :maxlength="20"
|
|
|
- :disabled="type === 'detail' || type === 'audit' || type==='check'"></el-input>
|
|
|
+ <span v-if="type === 'check'">{{ scope.row.inventory_num }}</span>
|
|
|
+ <el-input v-else v-model="scope.row.inventory_num" type="number" :min="0" :maxlength="20"
|
|
|
+ :disabled="type === 'detail' || type === 'audit' || type === 'check'"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="差异">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.usable_stock - scope.row.inventory_num || 0 }}
|
|
|
+ {{ scope.row.actual_stock - scope.row.inventory_num || 0 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="备注">
|
|
@@ -115,7 +120,7 @@
|
|
|
<el-input v-model="scope.row.remark" :min="0" :maxlength="20" :disabled="true" v-show="false"></el-input>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column label="操作" v-if="type !== 'detail' && type !== 'audit' && type!=='check'">
|
|
|
+ <el-table-column label="操作" v-if="type !== 'detail' && type !== 'audit' && type !== 'check'">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="danger"
|
|
|
@click="goodsInventoryAddForm.product_list.splice(scope.$index, 1)">删除</el-button>
|
|
@@ -126,19 +131,33 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<div class="footer">
|
|
|
- <!-- <el-button v-if="type === 'audit' && type !== 'detail' && type!=='check'" type="primary" @click="handlePassGoodsInventory()">通过
|
|
|
+ <!-- <el-button v-if="type === 'audit' && type !== 'detail' && type!=='check'" type="primary" @click="handlePassGoodsInventory()">通过
|
|
|
</el-button>
|
|
|
<el-button v-if="type === 'audit' && type !== 'detail' && type!=='check'" type="danger" @click="dialogVisible = true">驳回
|
|
|
</el-button> -->
|
|
|
- <el-button v-if="type !== 'audit' && type !== 'detail' && type!=='check'" type="primary" @click="submitGoodsInventoryAddForm">保存
|
|
|
+ <el-button v-if="type !== 'audit' && type !== 'detail' && type !== 'check'" type="primary"
|
|
|
+ @click="submitGoodsInventoryAddForm">保存
|
|
|
</el-button>
|
|
|
- <el-button @click="printIng" v-if="type=='check'">打印</el-button>
|
|
|
+ <el-button @click="printIng" v-if="type == 'check'">打印</el-button>
|
|
|
<el-button @click="$router.back()">返回
|
|
|
</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
+ <el-dialog title="扫码入库" :visible.sync="scanDialogVisible" width="30%" :close-on-click-modal="false">
|
|
|
+ <el-form ref="scanGoodsForm" :model="scanGoodsForm" label-width="120px" inline>
|
|
|
+ <!-- @blur="blurCode()" -->
|
|
|
+ <el-form-item label="sku" prop="bar_code">
|
|
|
+ <el-input v-model="scanGoodsForm.bar_code" ref="input" @keyup.enter.native="toSearch()" :minlength="0"
|
|
|
+ :maxlength="100"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="序列号" prop="sn_code">
|
|
|
+ <el-input ref="sn_input" v-model="sn_code" @keyup.enter.native="toSnCode()" :minlength="0"
|
|
|
+ :maxlength="100"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
|
|
|
- <el-form ref="goodsInventoryAddForm" :model="goodsInventoryAddForm" label-width="120px" inline style="width:900px">
|
|
|
+ <el-form ref="goodsInventoryAddForm" :model="goodsInventoryAddForm" label-width="120px" inline
|
|
|
+ style="width:900px">
|
|
|
<el-form-item label="驳回原因" prop="reject_reason" required="true">
|
|
|
<el-input v-model="goodsInventoryAddForm.reject_reason" type="textarea" :minlength="0"
|
|
|
:maxlength="100"></el-input>
|
|
@@ -156,6 +175,7 @@
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import { Foundation, RegExp } from '~/ui-utils'
|
|
|
import * as API_GoodsInventory from '@/api/goodsInventory'
|
|
|
+import * as API_GoodsExchange from "@/api/goodsExchange";
|
|
|
import * as API_Setting from '@/api/setting'
|
|
|
import * as API_BasicSetting from '@/api/basicSetting'
|
|
|
import * as API_Erp from '@/api/erp'
|
|
@@ -173,7 +193,10 @@ export default {
|
|
|
type: '',
|
|
|
/** 出库单表单*/
|
|
|
goodsInventoryAddForm: {
|
|
|
- product_list: []
|
|
|
+ product_list: [],
|
|
|
+ inventory_time: new Date(),
|
|
|
+ inventory_person_id: '',
|
|
|
+ creator_id: ''
|
|
|
},
|
|
|
/** 校验规则 */
|
|
|
goodsInventoryAddFormRule: {
|
|
@@ -183,43 +206,154 @@ export default {
|
|
|
creator_id: { required: true, message: '请选择制单人', trigger: 'change' }
|
|
|
},
|
|
|
warehouseProduct: null,
|
|
|
- typeList:[
|
|
|
- ]
|
|
|
+ typeList: [
|
|
|
+ ],
|
|
|
+ scanDialogVisible: false,//扫码窗口
|
|
|
+ scanGoodsForm: {},
|
|
|
+ sn_code: "",
|
|
|
+ sn_code_list: [],
|
|
|
+ index: "",
|
|
|
+ selectBtn: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['user'])
|
|
|
+ ...mapGetters(['user']),
|
|
|
+ timeDefault() {
|
|
|
+ var date = new Date();
|
|
|
+ var s1 = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()) + " " + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
|
|
+ return s1;
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.$route.name === 'goodsInventoryEdit') {
|
|
|
+ /* if (this.$route.name === 'goodsInventoryEdit') {
|
|
|
this.type = 'edit'
|
|
|
} else if (this.$route.name === 'goodsInventoryAudit') {
|
|
|
this.type = 'audit'
|
|
|
} else if (this.$route.name === 'goodsInventoryReturn') {
|
|
|
this.type = 'return'
|
|
|
- } else if (this.$route.name === 'goodsInventoryAdd') {
|
|
|
+ } else */ if (this.$route.name === 'goodsInventoryAdd') {
|
|
|
this.goodsInventoryAddForm.creator_id = this.user.uid
|
|
|
this.goodsInventoryAddForm.inventory_person_id = this.user.uid
|
|
|
this.goodsInventoryAddForm.dept_id = this.user.dept_id
|
|
|
- this.GET_WarehouseList({ dept_id: this.user.dept_id })
|
|
|
- /* this.$set(this.goodsInventoryAddForm, 'inventory_time', new Date().getTime()) */
|
|
|
+ this.goodsInventoryAddForm.inventory_time = this.timeDefault;
|
|
|
} else if (this.$route.name === 'goodsInventoryDetail') {
|
|
|
this.type = 'detail'
|
|
|
- }else if(this.$route.name === 'goodsInventoryCheck'){
|
|
|
- this.type='check'
|
|
|
- }
|
|
|
- if (this.$route.params.id) {
|
|
|
+ } else if (this.$route.name === 'goodsInventoryCheck') {
|
|
|
+ this.type = 'check'
|
|
|
this.id = this.$route.params.id
|
|
|
this.GET_goodsInventoryAddDetail()
|
|
|
+ this.GET_AdministratorList()
|
|
|
+ this.GET_DeptList()
|
|
|
+ this.GET_WarehouseList()
|
|
|
}
|
|
|
this.GET_AdministratorList()
|
|
|
this.GET_DeptList()
|
|
|
+ this.GET_WarehouseList()
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleChangeInventoryType(val) {
|
|
|
+ this.goodsInventoryAddForm.product_list = []
|
|
|
+ if (val.value === 'ALL_INVENTORY') {
|
|
|
+ if (!this.goodsInventoryAddForm.warehouse_id) {
|
|
|
+ this.$message.error('请先选择仓库!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ API_GoodsInventory.getGoodByWarehouseInventory({ page: 1, size: 10000 }, this.goodsInventoryAddForm.warehouse_id).then(res => {
|
|
|
+ res.records.map(el=>{
|
|
|
+ el.sn_code_list=[]
|
|
|
+ })
|
|
|
+ this.goodsInventoryAddForm.product_list = res.records
|
|
|
+ this.selectBtn = true
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.selectBtn = false
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //扫序列号goodsInventoryAddForm.product_list[this.index].sn_code_list
|
|
|
+ toSnCode() {
|
|
|
+ API_GoodsExchange.getSnCode("inventory", this.sku, this.sn_code.replace(/\s+/g, '')).then((res) => {
|
|
|
+ this.sn_code = "";
|
|
|
+ // 假设res是一个对象,我们根据res的某个属性(如sn)来检查重复
|
|
|
+ let exists = this.goodsInventoryAddForm.product_list[
|
|
|
+ this.index
|
|
|
+ ].sn_code_list.find(
|
|
|
+ (item) => item.sn_code === res.sn_code && item.sku === res.sku
|
|
|
+ );
|
|
|
+ if (!exists) {
|
|
|
+ this.goodsInventoryAddForm.product_list[this.index].sn_code_list.push(
|
|
|
+ res
|
|
|
+ );
|
|
|
+ }
|
|
|
+ /* this.goodsInventoryAddForm.product_list[this.index].sn_code_list.push(
|
|
|
+ res
|
|
|
+ ); */
|
|
|
+ this.goodsInventoryAddForm.product_list[this.index].inventory_num =
|
|
|
+ this.goodsInventoryAddForm.product_list[
|
|
|
+ this.index
|
|
|
+ ].sn_code_list.length;
|
|
|
+ this.scanGoodsForm.bar_code = "";
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.input.focus();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /* 扫sku */
|
|
|
+ toSearch() {
|
|
|
+ API_GoodsExchange.getProduct(
|
|
|
+ this.goodsInventoryAddForm.warehouse_id,
|
|
|
+ this.scanGoodsForm.bar_code.replace(/\s+/g, '')
|
|
|
+ ).then((res) => {
|
|
|
+ res.sn_code_list = [];
|
|
|
+ this.sku = res.product_vo.sku;
|
|
|
+ // 查找当前商品是否已存在于列表中
|
|
|
+ const indexs = this.goodsInventoryAddForm.product_list.findIndex(
|
|
|
+ (el) => {
|
|
|
+ console.log("Comparing with:", el);
|
|
|
+ return (
|
|
|
+ el.goods_id === res.goods_id &&
|
|
|
+ el.product_id === res.product_id &&
|
|
|
+ el.warehouse_id === res.warehouse_id &&
|
|
|
+ el.product_vo.sku === res.product_vo.sku
|
|
|
+ );
|
|
|
+ }
|
|
|
+ );
|
|
|
+ // 如果商品不存在,则添加到列表
|
|
|
+ if (indexs === -1) {
|
|
|
+ this.index = this.goodsInventoryAddForm.product_list.length;
|
|
|
+ this.goodsInventoryAddForm.product_list.push(res);
|
|
|
+ } else {
|
|
|
+ this.index = indexs;
|
|
|
+ }
|
|
|
+ if (res.product_vo.have_sn) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.sn_input.focus();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ /* this.scanDialogVisible = false; */
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 扫码入库
|
|
|
+ scanCode() {
|
|
|
+ if (!this.goodsInventoryAddForm.warehouse_id) {
|
|
|
+ this.$message.error("请选择仓库!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!this.goodsInventoryAddForm.inventory_type){
|
|
|
+ this.$message.error("请选择盘点类型!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.scanDialogVisible = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.input.focus();
|
|
|
+ });
|
|
|
+ },
|
|
|
getadminList(value) {
|
|
|
// Access orderTypeList directly from the component's data
|
|
|
const type = this.adminList.find(type => type.id === value);
|
|
|
- return type ? type.name : '未知类型';
|
|
|
+ return type ? type.real_name : '未知类型';
|
|
|
},
|
|
|
getRoleSplit(value) {
|
|
|
// Access orderTypeList directly from the component's data
|
|
@@ -228,11 +362,11 @@ export default {
|
|
|
},
|
|
|
getWarehouse(value) {
|
|
|
// Access orderTypeList directly from the component's data
|
|
|
- const type = this.WarehouseList.find(type => type.id === value);
|
|
|
+ const type = this.warehouseList.find(type => type.id === value);
|
|
|
return type ? type.name : '未知类型';
|
|
|
},
|
|
|
// 打印功能
|
|
|
- printIng(){
|
|
|
+ printIng() {
|
|
|
|
|
|
},
|
|
|
/** 修改报单人 */
|
|
@@ -297,7 +431,7 @@ export default {
|
|
|
},
|
|
|
/** 获取仓库 */
|
|
|
GET_WarehouseList(e) {
|
|
|
- API_BasicSetting.getWarehouseListAll(e).then(response => {
|
|
|
+ API_BasicSetting.getWarehouseListAll().then(response => {
|
|
|
this.warehouseList = response
|
|
|
})
|
|
|
},
|
|
@@ -306,6 +440,7 @@ export default {
|
|
|
if (valid) {
|
|
|
const { id } = this.goodsInventoryAddForm
|
|
|
const params = this.MixinClone(this.goodsInventoryAddForm)
|
|
|
+ params.inventory_type = params.inventory_type.id
|
|
|
if (params.dept_id) {
|
|
|
params.dept_name = this.deptListAll.find(dept => dept.id === params.dept_id).name
|
|
|
}
|
|
@@ -324,11 +459,12 @@ export default {
|
|
|
inventory_num: item.inventory_num * 1,
|
|
|
product_name: item.product_name,
|
|
|
product_sn: item.product_sn,
|
|
|
- product_id:item.product_id,
|
|
|
+ product_id: item.product_id,
|
|
|
specification: item.product_specification,
|
|
|
unit: item.product_unit,
|
|
|
remark: item.remark,
|
|
|
- product_stock_id:item.id
|
|
|
+ product_stock_id: item.id,
|
|
|
+ sn_code_list:item.sn_code_list
|
|
|
}
|
|
|
return query
|
|
|
})
|
|
@@ -365,19 +501,22 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
const goodsData = await this.$EnwarehouseEntryBatch({
|
|
|
- goodsApi:`/admin/erp/warehouseOut/getGoodByWarehouse/${this.goodsInventoryAddForm.warehouse_id}`,
|
|
|
+ goodsApi: `/admin/erp/warehouseOut/getGoodByWarehouseInventory/${this.goodsInventoryAddForm.warehouse_id}`,
|
|
|
warehouseList: this.warehouseList,
|
|
|
selectedIds: this.id ? this.goodsInventoryAddForm.product_list && this.goodsInventoryAddForm.product_list.map(item => item.id) : this.goodsInventoryAddForm.product_list.map(item => item.id),
|
|
|
purchasePlanApiParams: { warehouse_id: this.goodsInventoryAddForm.warehouse_id }
|
|
|
})
|
|
|
this.goodsInventoryAddForm.warehouse_id = goodsData.warehouse_id
|
|
|
- let ProductLendNum = goodsData.purchasePlans.map(item => {
|
|
|
- const query = {
|
|
|
+ /* let ProductLendNum = */goodsData.purchasePlans.map(item => {
|
|
|
+ /* const query = {
|
|
|
product_id: item.product_id,
|
|
|
- stock_sn: item.warehouse_entry_sn
|
|
|
+ stock_sn: item.warehouse_entry_sn,
|
|
|
+ sn_code_list:[]
|
|
|
}
|
|
|
- return query
|
|
|
+ return query */
|
|
|
+ item.sn_code_list = [];
|
|
|
})
|
|
|
+ console.log(goodsData.purchasePlans);
|
|
|
this.goodsInventoryAddForm.product_list = goodsData.purchasePlans
|
|
|
/* this.getlistProductLendNum(ProductLendNum, goodsData.purchasePlans) */
|
|
|
},
|
|
@@ -447,7 +586,7 @@ export default {
|
|
|
return el
|
|
|
}) */
|
|
|
this.goodsInventoryAddForm = response
|
|
|
- this.GET_WarehouseList({ dept_id: response.dept_id })
|
|
|
+ this.GET_WarehouseList()
|
|
|
this.goodsInventoryAddForm.distribution_name = response.staff_name
|
|
|
this.goodsInventoryAddForm.product_list = this.goodsInventoryAddForm.product_list.map(item => {
|
|
|
item.product_specification = item.specification
|
|
@@ -536,7 +675,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+.sn-code-container {
|
|
|
+ max-height: 100px;
|
|
|
+ /* 设置最大高度,超过这个高度将显示滚动条 */
|
|
|
+ overflow-y: auto;
|
|
|
+ /* 垂直方向上溢出时显示滚动条 */
|
|
|
+}
|
|
|
/deep/ {
|
|
|
.el-input--suffix .el-input__inner {
|
|
|
padding-right: 10px;
|