完善入库管理

This commit is contained in:
2024-07-02 14:59:42 +08:00
parent fd2d4a90b3
commit dcd970945e
8 changed files with 96 additions and 56 deletions

View File

@@ -48,8 +48,8 @@
</el-table-column>
<el-table-column label="是否可用" align="center" width="140">
<template slot-scope="scope">
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" :active-value="1"
:inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
</template>
</el-table-column>
<el-table-column prop="warehouseName" label="仓库名称" align="center" />

View File

@@ -284,7 +284,7 @@
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
this.getsupplierLust()
this.getsupplierLust()
}
})
@@ -319,7 +319,7 @@
choiceSupplierInfo({
createOrgSid: this.formobj.createOrgSid
createOrgSid: this.formobj.createOrgSid
}).then((resp) => {
if (resp.success) {
this.supplierNameList = resp.data
@@ -493,6 +493,7 @@
orderCount: row.orderCount,
batchNumber: '',
manufactureDate: '',
expirationDate: '',
batchCount: 0,
}
@@ -549,19 +550,6 @@
// return
// }
for (var i = 0; i < this.formobj.list.length; i++) {
if (Number(this.formobj.list[i].actualInCount) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品实收数量不能为空'
})
return
}
}
this.$refs['form_obj'].validate((valid) => {
@@ -598,20 +586,44 @@
// return
// }
for (var i = 0; i < this.formobj.list.length; i++) {
for (var i = 0; i < this.formobj.list.length; i++) {
if (Number(this.formobj.list[i].actualInCount) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品实收数量不能为空'
})
return
}
if (Number(this.formobj.list[i].actualInCount) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品实收数量不能为空'
})
return
}
}
for (var i = 0; i < this.formobj.pcList.length; i++) {
if (this.formobj.pcList[i].expirationDate == '') {
this.$message({
showClose: true,
type: 'error',
message: '生产日期不能为空'
})
return
}
if (Number(this.formobj.pcList[i].batchCount) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '批次数量不能为0'
})
return
}
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {

View File

@@ -81,7 +81,7 @@
</div>
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column fixed label="商品名称" prop="goodsSpuName" align="center" />
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
<el-table-column label="单位" prop="unit" align="center" width="120" />
@@ -161,6 +161,10 @@
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;

View File

@@ -92,8 +92,11 @@
<div class="title titleOne">
<div>商品列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleMaintenance()">选择商品</el-button>
<!-- <el-button type="primary" size="mini" class="btntopblueline" @click="batchAddAll()">批次收货</el-button> -->
<div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleMaintenance()">选择商品</el-button>
<el-button type="primary" size="mini" class="btntopblueline" @click="batchAddAll()">批次收货</el-button>
</div>
</div>
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;" ref="dataTable">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
@@ -110,13 +113,14 @@
</template>
</el-table-column> -->
<el-table-column label="操作" align="center" width="120">
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="doGoods(scope.row)">删除</el-button>
<el-button type="primary" size="mini" @click="doAddBatch(scope.row)">批次+</el-button>
</template>
</el-table-column>
<el-table-column label="商品名称" prop="goodsSpuName" align="center" width="200" />
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
<!-- <el-table-column label="商品名称" align="center" min-width="200" v-if="!isUpdata">
<template slot-scope="scope" v-if="!isUpdata">
@@ -222,7 +226,7 @@
</el-table>
<!-- <div class="title"
<div class="title"
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
<div>商品-批次</div>
</div>
@@ -255,7 +259,7 @@
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
</el-table> -->
</el-table>
</el-form>
@@ -498,14 +502,14 @@
"goodsSkuSid": e.goodsSpuSid,
"goodsSpuName": e.goodsSpuName,
"goodsSkuTitle": e.goodsSkuTitle,
"goodsSkuTitle": e.goodsSpuName,
"goodsSkuCode": e.goodsSkuCode,
"goodsSkuOwnSpec": e.indexes,
"unit": e.goodsUnitName,
"warehouseSid": e.warehouseSid,
"warehouseName": e.warehouseName,
"warehouseRackSid": e.warehouseRackSid,
"warehouseRackName": e.warehouseRackCode,
"warehouseRackName": e.warehouseRackName,
"actualInCount": 0,
"rejectCount": 0,
"rejectReason": "",
@@ -616,6 +620,31 @@
}
for (var i = 0; i < this.formobj.pcList.length; i++) {
if (this.formobj.pcList[i].expirationDate == '') {
this.$message({
showClose: true,
type: 'error',
message: '生产日期不能为空'
})
return
}
if (Number(this.formobj.pcList[i].batchCount) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '批次数量不能为0'
})
return
}
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
@@ -672,7 +701,7 @@
console.log("showAdd", this.isUpdata);
this.getsupplierLust()
this.getWarehouseList()
// this.getWarehouseList()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
@@ -690,7 +719,7 @@
this.title = "【修改】"
this.isUpdata = true
this.getsupplierLust()
this.getWarehouseList()
// this.getWarehouseList()
console.log("showEdit", this.isUpdata);
this.$nextTick(() => {
@@ -714,10 +743,10 @@
if (resp.success) {
this.formobj = resp.data
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
// this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
// .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
// this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
// .getItem('defaultOrgPath').lastIndexOf('/') + 1)

View File

@@ -79,7 +79,7 @@
</div>
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="商品名称" prop="goodsSpuName" align="center" width="200" />
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
<el-table-column label="单位" prop="unit" align="center" width="120" />
@@ -113,7 +113,7 @@
</el-table>
<!-- <div class="title titleOne">
<div class="title titleOne">
<div>商品-批次</div>
</div>
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;">
@@ -129,7 +129,7 @@
<el-table-column label="生产日期" prop="manufactureDate" align="center" width="180" />
<el-table-column label="有效期" prop="expirationDate" align="center" width="180" />
<el-table-column label="数量" prop="batchCount" align="center" width="120" />
</el-table> -->
</el-table>
</el-form>

View File

@@ -82,7 +82,7 @@
<el-button type="primary" size="mini" @click="doGoodsDel(scope.row.goodsSkuSid)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品名称" prop="goodsSpuName" align="center" />
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
@@ -302,10 +302,10 @@
if (resp.success) {
this.formobj = resp.data
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
// this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
// .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
// this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
// .getItem('defaultOrgPath').lastIndexOf('/') + 1)
}
})
.catch(e => {

View File

@@ -28,11 +28,6 @@
<div class="span-sty">制单部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">制单人</div>
<el-form-item><el-input v-model="formobj.createByName" placeholder="" class="addinputw addinputInfo"
clearable /></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 单据日期</div>
<el-form-item prop="createTime"> <el-date-picker v-model="formobj.createTime" type="date"

View File

@@ -69,7 +69,7 @@
<el-table v-loading="listLoading" :data="formobj.list" border>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column fixed label="商品名称" prop="goodsSpuName" align="center" width="200" />
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />