|
@@ -76,7 +76,7 @@
|
|
|
<!--净重(吨)-->
|
|
|
<ws-form-item label="净重(吨)" span="1" prop="netWeight">
|
|
|
<ws-input
|
|
|
- :readonly="readonly"
|
|
|
+ :readonly="readonly"
|
|
|
v-model.number="dataList.netWeight"
|
|
|
placeholder="不可编辑,自动计算"
|
|
|
type="number"
|
|
@@ -101,14 +101,22 @@
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
|
|
|
- <!--经办人-->
|
|
|
+ <!--经办人-->
|
|
|
<ws-form-item label="经办人" span="1" prop="agent">
|
|
|
- <ws-input
|
|
|
+ <el-select
|
|
|
v-model="dataList.agent"
|
|
|
- placeholder="请输入出库经办人姓名"
|
|
|
- maxlength="100"
|
|
|
- size="small"
|
|
|
- />
|
|
|
+ placeholder="请选择经办人"
|
|
|
+ filterable
|
|
|
+ :filter-method="dataFilter"
|
|
|
+ @change="selectstaff"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.staffName"
|
|
|
+ :value="item.staffName"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</ws-form-item>
|
|
|
<!--入库日期-->
|
|
|
<ws-form-item
|
|
@@ -152,15 +160,65 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--合同编号-->
|
|
|
- <ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
+ <!-- <ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
<ws-input
|
|
|
v-model="dataList.contractNo"
|
|
|
placeholder="请输入合同编号"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
- </ws-form-item>
|
|
|
+ </ws-form-item> -->
|
|
|
+ <ws-form-item label="合同编号" span="1">
|
|
|
+ <ws-select
|
|
|
+ v-model="dataList.contractNo"
|
|
|
+ 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 warehouseType>
|
|
|
+ <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
|
|
|
+ <ws-info-table
|
|
|
+ v-show="checked == true">
|
|
|
+ <!-- 出库类型 -->
|
|
|
+ <ws-form-item label="出库类型" span="1">
|
|
|
+ <ws-select
|
|
|
+ v-model="deptBudgetList.deliveryType"
|
|
|
+ placeholder=""
|
|
|
+ class="typeselect"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in deliveryType"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.constValue"
|
|
|
+ :value="item.constValue"
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <!-- 出库合同编号 -->
|
|
|
+ <ws-form-item label="出库合同编号" span="1">
|
|
|
+ <ws-select
|
|
|
+ v-model="dataList.contractNo"
|
|
|
+ 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>
|
|
|
</div>
|
|
|
<div class="small-title">上传仓库照片</div>
|
|
|
<ws-upload
|
|
@@ -185,7 +243,6 @@
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
|
/>
|
|
|
-
|
|
|
</ws-form-item>
|
|
|
</div>
|
|
|
<div class="neifor">
|
|
@@ -266,10 +323,15 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { pullDown, addstorageputList } from '@/model/warehouse/index'
|
|
|
+import {
|
|
|
+ pullDown,
|
|
|
+ addstorageputList,
|
|
|
+ xialaNo,
|
|
|
+ getstaff,
|
|
|
+} from '@/model/warehouse/index'
|
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
-import { mapActions, mapGetters, mapState } from 'vuex'
|
|
|
+import { mapActions, mapGetters, mapState } from 'vuex'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
// import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
|
import { dayjs, EventBus } from 'base-core-lib'
|
|
@@ -287,10 +349,8 @@ export default {
|
|
|
this.showType = val
|
|
|
},
|
|
|
},
|
|
|
- computed:{
|
|
|
- ...mapGetters([
|
|
|
- 'deptBudgetList',
|
|
|
- ]),
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['deptBudgetList']),
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -306,7 +366,7 @@ export default {
|
|
|
// 年
|
|
|
year: '',
|
|
|
deptBudgetTotal: 0,
|
|
|
- readonly:true,
|
|
|
+ readonly: true,
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
searchType: 1,
|
|
@@ -315,12 +375,19 @@ export default {
|
|
|
startDate: null,
|
|
|
endDate: null,
|
|
|
goodnameList: {},
|
|
|
+ checked: true,
|
|
|
+
|
|
|
+ staffList: [],
|
|
|
+ options: [],
|
|
|
+ storageType: [],
|
|
|
+ deliveryType: [],
|
|
|
+ outContractNo: [],
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
storageType: [],
|
|
|
appendixIdsAdd: '',
|
|
|
uploadSuccess: {},
|
|
|
- warehouseInOutDetail:{},
|
|
|
+ warehouseInOutDetail: {},
|
|
|
onChange: {},
|
|
|
deptBudgetList1: [],
|
|
|
gradeList: [],
|
|
@@ -344,17 +411,17 @@ export default {
|
|
|
},
|
|
|
contractList: [],
|
|
|
dataList: {
|
|
|
- id:'',
|
|
|
- grossWeight:'',
|
|
|
- contractNo:'',
|
|
|
- tare:'',
|
|
|
- netWeight:'',
|
|
|
- grade:'',
|
|
|
- agent:'',
|
|
|
- carNo:'',
|
|
|
- inOutDate:'',
|
|
|
- inOutType:'',
|
|
|
- goodsName:'',
|
|
|
+ id: '',
|
|
|
+ grossWeight: '',
|
|
|
+ contractNo: '',
|
|
|
+ tare: '',
|
|
|
+ netWeight: '',
|
|
|
+ grade: '',
|
|
|
+ agent: '',
|
|
|
+ carNo: '',
|
|
|
+ inOutDate: '',
|
|
|
+ inOutType: '',
|
|
|
+ goodsName: '',
|
|
|
warehouseInOutDetail: {},
|
|
|
},
|
|
|
historyList: [],
|
|
@@ -366,12 +433,12 @@ export default {
|
|
|
accessoryTFs: false,
|
|
|
}
|
|
|
},
|
|
|
- activated() {
|
|
|
+ activated() {
|
|
|
this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
|
|
|
this.deptBudgetList1.binNumber = this.$route.query.binNumber
|
|
|
this.getList()
|
|
|
- this.dataList.id=this.$route.query.id
|
|
|
- this.dataList.grossWeight=this.$route.query.grossWeight
|
|
|
+ this.dataList.id = this.$route.query.id
|
|
|
+ this.dataList.grossWeight = this.$route.query.grossWeight
|
|
|
this.dataList.contractNo = this.$route.query.contractNo
|
|
|
this.dataList.baseId = this.$route.query.baseId
|
|
|
this.dataList.positionId = this.$route.query.positionId
|
|
@@ -392,12 +459,38 @@ export default {
|
|
|
this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
|
|
|
this.dataList.statusFlag = this.$route.statusFlag
|
|
|
this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
|
|
|
+ this.deptBudgetList.warehouseType = this.$route.query.warehouseType
|
|
|
},
|
|
|
methods: {
|
|
|
//返回按钮
|
|
|
revert() {
|
|
|
this.$router.go(-1)
|
|
|
},
|
|
|
+ dataFilter(val) {
|
|
|
+ // console.log(val,"名")
|
|
|
+ this.deptBudgetList.staffList = val
|
|
|
+ if (val) {
|
|
|
+ //val存在
|
|
|
+ this.options = this.staffList.filter((item) => {
|
|
|
+ if (
|
|
|
+ !!~item.staffName.indexOf(val) ||
|
|
|
+ !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
|
|
|
+ ) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ //val为空时,还原数组
|
|
|
+ this.options = this.staffList
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectstaff(e) {
|
|
|
+ for (var i = 0; i < this.staffList.length; i++) {
|
|
|
+ if (this.staffList[i].staffName == e) {
|
|
|
+ this.deptBudgetList.personChargeKey = this.staffList[i].staffId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//暂存按钮
|
|
|
temporaryStorage() {
|
|
|
this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
|
|
@@ -408,9 +501,7 @@ export default {
|
|
|
.then(() => {
|
|
|
this.$refs.dataList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.dataList.compId = sessionStorage.getItem(
|
|
|
- 'ws-pf_compId'
|
|
|
- )
|
|
|
+ this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
this.dataList.inOutFlag = 2
|
|
|
this.dataList.statusFlag = 1
|
|
|
addstorageputList(this.dataList)
|
|
@@ -431,7 +522,7 @@ export default {
|
|
|
},
|
|
|
//提交按钮
|
|
|
submit() {
|
|
|
- if (!this.dataList.goodsName) {
|
|
|
+ if (!this.dataList.goodsName) {
|
|
|
this.$message({
|
|
|
message: '货名不能为空',
|
|
|
type: 'warning',
|
|
@@ -459,7 +550,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (
|
|
|
this.dataList.tare < 0 ||
|
|
|
this.dataList.tare > 10000 ||
|
|
@@ -481,17 +572,14 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (
|
|
|
- this.dataList.agent.length < 2 ||
|
|
|
- this.dataList.agent.length > 10
|
|
|
- ) {
|
|
|
+ if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
|
|
|
this.$message({
|
|
|
message: '经办人输入有误',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.dataList.grade) {
|
|
|
+ if (!this.dataList.grade) {
|
|
|
this.$message({
|
|
|
message: '品级不能为空!',
|
|
|
type: 'warning',
|
|
@@ -551,11 +639,10 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- //自检员
|
|
|
+ //自检员
|
|
|
if (this.dataList.warehouseInOutDetail.qualityInspector) {
|
|
|
if (
|
|
|
- this.dataList.warehouseInOutDetail.qualityInspector.length <
|
|
|
- 2 ||
|
|
|
+ this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
|
|
|
this.dataList.warehouseInOutDetail.qualityInspector.length > 10
|
|
|
) {
|
|
|
this.$message({
|
|
@@ -576,14 +663,13 @@ export default {
|
|
|
if (
|
|
|
this.dataList.warehouseInOutDetail.waterContent < 1 ||
|
|
|
this.dataList.warehouseInOutDetail.waterContent > 40 ||
|
|
|
- (String(
|
|
|
- this.dataList.warehouseInOutDetail.waterContent
|
|
|
- ).indexOf('.') != -1 &&
|
|
|
- String(this.dataList.warehouseInOutDetail.waterContent)
|
|
|
- .length -
|
|
|
- (String(
|
|
|
- this.dataList.warehouseInOutDetail.waterContent
|
|
|
- ).indexOf('.') +
|
|
|
+ (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.dataList.warehouseInOutDetail.waterContent).length -
|
|
|
+ (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
|
|
|
+ '.'
|
|
|
+ ) +
|
|
|
1) >
|
|
|
2)
|
|
|
) {
|
|
@@ -607,13 +693,12 @@ export default {
|
|
|
if (
|
|
|
this.dataList.warehouseInOutDetail.impurity < 1 ||
|
|
|
this.dataList.warehouseInOutDetail.impurity > 40 ||
|
|
|
- (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
|
|
|
- '.'
|
|
|
- ) != -1 &&
|
|
|
+ (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
|
|
|
+ -1 &&
|
|
|
String(this.dataList.warehouseInOutDetail.impurity).length -
|
|
|
- (String(
|
|
|
- this.dataList.warehouseInOutDetail.impurity
|
|
|
- ).indexOf('.') +
|
|
|
+ (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
|
|
|
+ '.'
|
|
|
+ ) +
|
|
|
1) >
|
|
|
2)
|
|
|
) {
|
|
@@ -624,7 +709,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- //霉变
|
|
|
+ //霉变
|
|
|
if (this.dataList.warehouseInOutDetail.mildewGrain) {
|
|
|
if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
|
|
|
this.$message({
|
|
@@ -640,9 +725,9 @@ export default {
|
|
|
'.'
|
|
|
) != -1 &&
|
|
|
String(this.dataList.warehouseInOutDetail.mildewGrain).length -
|
|
|
- (String(
|
|
|
- this.dataList.warehouseInOutDetail.mildewGrain
|
|
|
- ).indexOf('.') +
|
|
|
+ (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
|
|
|
+ '.'
|
|
|
+ ) +
|
|
|
1) >
|
|
|
2)
|
|
|
) {
|
|
@@ -654,7 +739,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //热损伤
|
|
|
+ //热损伤
|
|
|
if (this.dataList.warehouseInOutDetail.jiaorenli) {
|
|
|
if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
|
|
|
this.$message({
|
|
@@ -666,13 +751,12 @@ export default {
|
|
|
if (
|
|
|
this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
|
|
|
this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
|
|
|
- (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
|
|
|
- '.'
|
|
|
- ) != -1 &&
|
|
|
+ (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
|
|
|
+ -1 &&
|
|
|
String(this.dataList.warehouseInOutDetail.jiaorenli).length -
|
|
|
- (String(
|
|
|
- this.dataList.warehouseInOutDetail.jiaorenli
|
|
|
- ).indexOf('.') +
|
|
|
+ (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
|
|
|
+ '.'
|
|
|
+ ) +
|
|
|
1) >
|
|
|
2)
|
|
|
) {
|
|
@@ -684,7 +768,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //不完整粒(%)
|
|
|
+ //不完整粒(%)
|
|
|
if (this.dataList.warehouseInOutDetail.imperfectGrain) {
|
|
|
if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
|
|
|
this.$message({
|
|
@@ -714,7 +798,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
//容重
|
|
|
- if (this.dataList.warehouseInOutDetail.bulkDensity) {
|
|
|
+ if (this.dataList.warehouseInOutDetail.bulkDensity) {
|
|
|
if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
|
|
|
this.$message({
|
|
|
message: '容重(克/升)非数字!',
|
|
@@ -729,9 +813,9 @@ export default {
|
|
|
'.'
|
|
|
) != -1 &&
|
|
|
String(this.dataList.warehouseInOutDetail.bulkDensity).length -
|
|
|
- (String(
|
|
|
- this.dataList.warehouseInOutDetail.bulkDensity
|
|
|
- ).indexOf('.') +
|
|
|
+ (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
|
|
|
+ '.'
|
|
|
+ ) +
|
|
|
1) >
|
|
|
0)
|
|
|
) {
|
|
@@ -750,9 +834,7 @@ export default {
|
|
|
.then(() => {
|
|
|
this.$refs.dataList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.dataList.compId = sessionStorage.getItem(
|
|
|
- 'ws-pf_compId'
|
|
|
- )
|
|
|
+ this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
this.dataList.inOutFlag = 2
|
|
|
this.dataList.statusFlag = 3
|
|
|
addstorageputList(this.dataList)
|
|
@@ -851,10 +933,40 @@ export default {
|
|
|
this.gradeList = response
|
|
|
})
|
|
|
// 类型
|
|
|
- pullDown({ constId: 'CON5' })
|
|
|
+ if (this.$route.query.warehouseType == '1') {
|
|
|
+ pullDown({ constId: 'CON5' })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.storageType = response
|
|
|
+ })
|
|
|
+ } else if (this.$route.query.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.options = response
|
|
|
+ this.staffList = response
|
|
|
+ // this.agent = response
|
|
|
})
|
|
|
},
|
|
|
selecttaskType(e) {
|
|
@@ -921,6 +1033,7 @@ export default {
|
|
|
type: 'xls',
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
// deletecontract(){},
|
|
|
//删除
|
|
|
approve() {},
|
|
@@ -985,15 +1098,15 @@ export default {
|
|
|
/deep/.el-form-item__label {
|
|
|
width: 160px;
|
|
|
}
|
|
|
-.inspector{
|
|
|
+.inspector {
|
|
|
width: 50%;
|
|
|
-}
|
|
|
+}
|
|
|
//质检员
|
|
|
/deep/[data-v-58803672] .el-form-item__label {
|
|
|
- width: 60px;
|
|
|
+ width: 60px;
|
|
|
}
|
|
|
[data-v-58803672] .el-form-item__label {
|
|
|
- width: 60px;
|
|
|
+ width: 60px;
|
|
|
}
|
|
|
//选填
|
|
|
/deep/.el-form-item {
|