|
@@ -25,7 +25,12 @@
|
|
|
<div class="basicInformation">
|
|
|
<h2>
|
|
|
{{ deptBudgetList.warehouseName }}库
|
|
|
- <span class="position" v-show="this.deptBudgetList.warehouseType==1"> {{ deptBudgetList.binNumber }}仓位 </span>
|
|
|
+ <span
|
|
|
+ class="position"
|
|
|
+ v-show="this.deptBudgetList.warehouseType == 1"
|
|
|
+ >
|
|
|
+ {{ deptBudgetList.binNumber }}仓位
|
|
|
+ </span>
|
|
|
<span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
|
|
|
</h2>
|
|
|
<div class="small-title">基本信息</div>
|
|
@@ -100,12 +105,18 @@
|
|
|
</ws-form-item>
|
|
|
<!--经办人-->
|
|
|
<ws-form-item label="经办人" span="1" prop="agent">
|
|
|
- <ws-input
|
|
|
+ <ws-select
|
|
|
v-model="deptBudgetList.agent"
|
|
|
- placeholder="请输入出库经办人姓名"
|
|
|
- maxlength="100"
|
|
|
- size="small"
|
|
|
- />
|
|
|
+ placeholder=""
|
|
|
+ class="typeselect"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in agent"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.staffName"
|
|
|
+ :value="item.staffName"
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
</ws-form-item>
|
|
|
<!--出库日期-->
|
|
|
<ws-form-item
|
|
@@ -121,16 +132,16 @@
|
|
|
value-format="yyyy-MM-dd"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!-- 入库类型 -->
|
|
|
+ <!-- 出库类型 -->
|
|
|
<ws-form-item label="出库类型" span="1">
|
|
|
<ws-select
|
|
|
- v-model="deptBudgetList.inOutType"
|
|
|
+ v-model="deptBudgetList.deliveryType"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
|
@change="selectstorageType"
|
|
|
>
|
|
|
<ws-option
|
|
|
- v-for="item in storageType"
|
|
|
+ v-for="item in deliveryType"
|
|
|
:key="item.constKey"
|
|
|
:label="item.constValue"
|
|
|
:value="item.constValue"
|
|
@@ -148,12 +159,18 @@
|
|
|
</ws-form-item>
|
|
|
<!--合同编号-->
|
|
|
<ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
- <ws-input
|
|
|
+ <ws-select
|
|
|
v-model="deptBudgetList.contractNo"
|
|
|
- placeholder="请输入合同编号"
|
|
|
- maxlength="100"
|
|
|
- size="small"
|
|
|
- />
|
|
|
+ placeholder="请选择合同编号或移库任务编号"
|
|
|
+ class="typeselect"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in outContractNo"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.contractNo"
|
|
|
+ :value="item.contractNo"
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
</ws-form-item>
|
|
|
</ws-info-table>
|
|
|
</div>
|
|
@@ -256,7 +273,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { pullDown, addstorageputList, goodsname } from '@/model/warehouse/index'
|
|
|
+import {
|
|
|
+ pullDown,
|
|
|
+ addstorageputList,
|
|
|
+ goodsname,
|
|
|
+ xialaNo,
|
|
|
+ getstaff,
|
|
|
+} from '@/model/warehouse/index'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
// import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
@@ -300,11 +323,13 @@ export default {
|
|
|
goodnameList: {},
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
- storageType: [],
|
|
|
+ deliveryType: [],
|
|
|
+ outContractNo: [],
|
|
|
appendixIdsAdd: '',
|
|
|
uploadSuccess: {},
|
|
|
onChange: {},
|
|
|
gradeList: [],
|
|
|
+ agent: [],
|
|
|
rules: {
|
|
|
netWeight: [
|
|
|
{
|
|
@@ -352,15 +377,15 @@ export default {
|
|
|
this.$router.push({ path: 'warehouseManagementList' })
|
|
|
},
|
|
|
temporaryStorage() {
|
|
|
- if (!this.deptBudgetList.goodsName) {
|
|
|
+ if (!this.deptBudgetList.goodsName) {
|
|
|
this.$message({
|
|
|
message: '货名不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(!this.deptBudgetList.grossWeight){
|
|
|
- this.$message({
|
|
|
+ if (!this.deptBudgetList.grossWeight) {
|
|
|
+ this.$message({
|
|
|
message: '毛重不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
@@ -380,8 +405,8 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(!this.deptBudgetList.tare){
|
|
|
- this.$message({
|
|
|
+ if (!this.deptBudgetList.tare) {
|
|
|
+ this.$message({
|
|
|
message: '皮重不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
@@ -401,8 +426,8 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(!this.deptBudgetList.agent){
|
|
|
- this.$message({
|
|
|
+ if (!this.deptBudgetList.agent) {
|
|
|
+ this.$message({
|
|
|
message: '经办人不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
@@ -418,8 +443,8 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(!this.deptBudgetList.carNo){
|
|
|
- this.$message({
|
|
|
+ if (!this.deptBudgetList.carNo) {
|
|
|
+ this.$message({
|
|
|
message: '车牌号不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
@@ -432,8 +457,8 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(!this.deptBudgetList.contractNo){
|
|
|
- this.$message({
|
|
|
+ if (!this.deptBudgetList.contractNo) {
|
|
|
+ this.$message({
|
|
|
message: '合同编号不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
@@ -449,7 +474,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- //自检员
|
|
|
+ //自检员
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
|
|
|
if (
|
|
|
this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
|
|
@@ -522,7 +547,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- //霉变
|
|
|
+ //霉变
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
|
|
|
this.$message({
|
|
@@ -537,7 +562,8 @@ export default {
|
|
|
(String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
|
|
|
'.'
|
|
|
) != -1 &&
|
|
|
- String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
|
|
|
+ String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
|
|
|
+ .length -
|
|
|
(String(
|
|
|
this.deptBudgetList.warehouseInOutDetail.mildewGrain
|
|
|
).indexOf('.') +
|
|
@@ -552,7 +578,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //热损伤
|
|
|
+ //热损伤
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
|
|
|
this.$message({
|
|
@@ -582,7 +608,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //不完整粒(%)
|
|
|
+ //不完整粒(%)
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
|
|
|
this.$message({
|
|
@@ -594,10 +620,11 @@ export default {
|
|
|
if (
|
|
|
this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
|
|
|
this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
|
|
|
- (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
|
|
|
- '.'
|
|
|
- ) != -1 &&
|
|
|
- String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.imperfectGrain
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
|
|
|
+ .length -
|
|
|
(String(
|
|
|
this.deptBudgetList.warehouseInOutDetail.imperfectGrain
|
|
|
).indexOf('.') +
|
|
@@ -612,7 +639,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
//容重
|
|
|
- if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
|
|
|
+ if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
|
|
|
this.$message({
|
|
|
message: '容重(克/升)非数字!',
|
|
@@ -626,7 +653,8 @@ export default {
|
|
|
(String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
|
|
|
'.'
|
|
|
) != -1 &&
|
|
|
- String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
|
|
|
+ String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
|
|
|
+ .length -
|
|
|
(String(
|
|
|
this.deptBudgetList.warehouseInOutDetail.bulkDensity
|
|
|
).indexOf('.') +
|
|
@@ -648,9 +676,8 @@ export default {
|
|
|
.then(() => {
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem(
|
|
|
- 'ws-pf_compId'
|
|
|
- )
|
|
|
+ this.deptBudgetList.compId =
|
|
|
+ sessionStorage.getItem('ws-pf_compId')
|
|
|
this.deptBudgetList.inOutFlag = 1
|
|
|
this.deptBudgetList.statusFlag = 1
|
|
|
addstorageputList(this.deptBudgetList)
|
|
@@ -706,7 +733,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (
|
|
|
+ if (
|
|
|
this.deptBudgetList.tare < 0 ||
|
|
|
this.deptBudgetList.tare > 10000 ||
|
|
|
(String(this.deptBudgetList.tare).indexOf('.') != -1 &&
|
|
@@ -809,7 +836,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- //自检员
|
|
|
+ //自检员
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
|
|
|
if (
|
|
|
this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
|
|
@@ -882,7 +909,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- //霉变
|
|
|
+ //霉变
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
|
|
|
this.$message({
|
|
@@ -897,7 +924,8 @@ export default {
|
|
|
(String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
|
|
|
'.'
|
|
|
) != -1 &&
|
|
|
- String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
|
|
|
+ String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
|
|
|
+ .length -
|
|
|
(String(
|
|
|
this.deptBudgetList.warehouseInOutDetail.mildewGrain
|
|
|
).indexOf('.') +
|
|
@@ -912,7 +940,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //热损伤
|
|
|
+ //热损伤
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
|
|
|
this.$message({
|
|
@@ -942,7 +970,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //不完整粒(%)
|
|
|
+ //不完整粒(%)
|
|
|
if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
|
|
|
this.$message({
|
|
@@ -954,10 +982,11 @@ export default {
|
|
|
if (
|
|
|
this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
|
|
|
this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
|
|
|
- (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
|
|
|
- '.'
|
|
|
- ) != -1 &&
|
|
|
- String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.imperfectGrain
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
|
|
|
+ .length -
|
|
|
(String(
|
|
|
this.deptBudgetList.warehouseInOutDetail.imperfectGrain
|
|
|
).indexOf('.') +
|
|
@@ -972,7 +1001,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
//容重
|
|
|
- if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
|
|
|
+ if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
|
|
|
if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
|
|
|
this.$message({
|
|
|
message: '容重(克/升)非数字!',
|
|
@@ -986,7 +1015,8 @@ export default {
|
|
|
(String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
|
|
|
'.'
|
|
|
) != -1 &&
|
|
|
- String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
|
|
|
+ String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
|
|
|
+ .length -
|
|
|
(String(
|
|
|
this.deptBudgetList.warehouseInOutDetail.bulkDensity
|
|
|
).indexOf('.') +
|
|
@@ -1000,29 +1030,28 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- this.$confirm(`确定提交出库信息`, {
|
|
|
+ this.$confirm(`确定提交出库信息`, {
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
+ }).then(() => {
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
+ this.deptBudgetList.inOutFlag = 1
|
|
|
+ this.deptBudgetList.statusFlag = 3
|
|
|
+ addstorageputList(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ this.$router.push({ path: 'warehouseManagementList' })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
- this.deptBudgetList.inOutFlag = 1
|
|
|
- this.deptBudgetList.statusFlag = 3
|
|
|
- addstorageputList(this.deptBudgetList)
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('添加成功')
|
|
|
- this.$router.push({ path: 'warehouseManagementList' })
|
|
|
- })
|
|
|
- } else {
|
|
|
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
},
|
|
|
tarechange(e) {
|
|
|
if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
@@ -1085,11 +1114,42 @@ export default {
|
|
|
.then((response) => {
|
|
|
this.gradeList = response
|
|
|
})
|
|
|
+ // // 类型
|
|
|
+ // pullDown({ constId: 'CON6' })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.storageType = response
|
|
|
+ // })
|
|
|
// 类型
|
|
|
- pullDown({ constId: 'CON6' })
|
|
|
+ if (this.deptBudgetList.warehouseType == 1) {
|
|
|
+ pullDown({ constId: 'CON6' })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.deliveryType = response
|
|
|
+ })
|
|
|
+ } else if (this.deptBudgetList.warehouseType == 2) {
|
|
|
+ // pullDown({ constId: 'WARE1' })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.storageType = response
|
|
|
+ // })
|
|
|
+ pullDown({ constId: 'WARE2' })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.deliveryType = response
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //合同编号
|
|
|
+ xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- this.storageType = response
|
|
|
+ this.outContractNo = response
|
|
|
+ })
|
|
|
+ //经办人
|
|
|
+ getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.agent = response
|
|
|
})
|
|
|
},
|
|
|
selecttaskType(e) {
|
|
@@ -1236,9 +1296,9 @@ export default {
|
|
|
color: #8890b1;
|
|
|
line-height: 16px;
|
|
|
}
|
|
|
-.inspector{
|
|
|
+.inspector {
|
|
|
width: 50%;
|
|
|
-}
|
|
|
+}
|
|
|
//质检员
|
|
|
.inspector .el-form-item__content {
|
|
|
text-align: left;
|