|
@@ -33,7 +33,7 @@
|
|
|
src="../../../public/img/cangku.png"
|
|
|
alt
|
|
|
/>
|
|
|
- {{ deptBudgetList.warehouseName }}库
|
|
|
+ {{ deptBudgetList.warehouseName }}
|
|
|
<span class="position" v-show="this.$route.query.warehouseType == 1"
|
|
|
>{{ deptBudgetList.binNumber }}仓位</span
|
|
|
>
|
|
@@ -210,6 +210,7 @@
|
|
|
<!--净重(吨)-->
|
|
|
<ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
|
|
|
<ws-input
|
|
|
+ @input="kkInput(deptBudgetList.deductionAmount)"
|
|
|
v-model="deptBudgetList.deductionAmount"
|
|
|
placeholder="请输入扣款金额"
|
|
|
maxlength="120"
|
|
@@ -239,6 +240,7 @@
|
|
|
v-model="deptBudgetList.agent"
|
|
|
placeholder="请选择经办人"
|
|
|
filterable
|
|
|
+ clearable
|
|
|
:filter-method="dataFilter"
|
|
|
@change="selectstaff"
|
|
|
>
|
|
@@ -271,6 +273,7 @@
|
|
|
placeholder
|
|
|
class="typeselect"
|
|
|
@change="selectstorageType"
|
|
|
+ :disabled="isSelectType"
|
|
|
>
|
|
|
<ws-option
|
|
|
v-for="item in storageType"
|
|
@@ -389,18 +392,7 @@
|
|
|
</ws-info-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <ws-upload
|
|
|
- ref="upload"
|
|
|
- table-name="maintain_work_order"
|
|
|
- oss-key="mainPlan"
|
|
|
- :comp-id="compId"
|
|
|
- :appendix-ids="appendixIdsAdd"
|
|
|
- :vesselId="deptBudgetList.addressUrl"
|
|
|
- :size-limit="size"
|
|
|
- @uploadSuccess="uploadSuccess"
|
|
|
- @onChange="onChange"
|
|
|
- accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
|
|
|
- />
|
|
|
+ <div class="small-title">上传磅单照片</div>
|
|
|
<el-upload
|
|
|
action="https://www.zthymaoyi.com/upload/admin"
|
|
|
:show-file-list="false"
|
|
@@ -412,10 +404,10 @@
|
|
|
class="avatar-uploader"
|
|
|
accept=".jpg, .jpeg, .png, .gif"
|
|
|
>
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
</el-upload>
|
|
|
- <div>
|
|
|
+ <div v-if='deptBudgetList.addressUrl!=""'>
|
|
|
<img
|
|
|
- v-if="deptBudgetList.addressUrl"
|
|
|
style="width: 100px; height: 100px"
|
|
|
:src="deptBudgetList.addressUrl"
|
|
|
alt=""
|
|
@@ -424,14 +416,32 @@
|
|
|
<div class="small-title">化验数据(选填)</div>
|
|
|
<div class="inspector">
|
|
|
<!--自检员-->
|
|
|
- <ws-form-item label="质检员" span="1" prop="qualityInspector">
|
|
|
+ <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
|
|
|
placeholder="请输入质检员姓名"
|
|
|
maxlength="10"
|
|
|
size="small"
|
|
|
/>
|
|
|
- </ws-form-item>
|
|
|
+ </ws-form-item> -->
|
|
|
+
|
|
|
+ <ws-form-item label="自检员" span="1" prop="qualityInspector">
|
|
|
+ <el-select
|
|
|
+ v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
|
|
|
+ placeholder="请选择自检员"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :filter-method="qualityDataFilter"
|
|
|
+ @change="qualityInspectorChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in qualityInspectorList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.staffName"
|
|
|
+ :value="item.staffName"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
</div>
|
|
|
|
|
|
<div class="neifor">
|
|
@@ -550,6 +560,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ qualityInspectorList:[],
|
|
|
+ isGetCost:false,
|
|
|
+ isSelectType:true,
|
|
|
//弹出框
|
|
|
dialogViewSpareMoney: false,
|
|
|
dialogApproveFormVisible: false,
|
|
@@ -616,10 +629,12 @@ export default {
|
|
|
type: '干粮',
|
|
|
freight: 0,
|
|
|
cost: '',
|
|
|
+ addressUrl:'',
|
|
|
warehouseInOutDetail: {},
|
|
|
+ deductionAmount:0,
|
|
|
},
|
|
|
historyList: [],
|
|
|
-
|
|
|
+ cost:'',
|
|
|
pickerBeginDateBefore: {
|
|
|
disabledDate: (time) => {
|
|
|
return time.getTime() > Date.now()
|
|
@@ -628,7 +643,7 @@ export default {
|
|
|
accessoryTFs: false,
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted() {debugger
|
|
|
this.deptBudgetList.baseId = this.$route.query.baseId
|
|
|
this.deptBudgetList.positionId = this.$route.query.positionId
|
|
|
this.deptBudgetList.warehouseName = this.$route.query.warehouseName
|
|
@@ -638,17 +653,37 @@ export default {
|
|
|
this.getList()
|
|
|
this.deptBudgetList.grade = '一等品'
|
|
|
this.deptBudgetList.gradeKey = '1'
|
|
|
- if (this.deptBudgetList.warehouseType == 1) {
|
|
|
- this.deptBudgetList.inOutType = '采购入库'
|
|
|
- this.deptBudgetList.inOutTypeKey = '1'
|
|
|
- } else {
|
|
|
- this.deptBudgetList.inOutType = '退库'
|
|
|
- this.deptBudgetList.inOutTypeKey = '1'
|
|
|
- }
|
|
|
+ if(this.deptBudgetList.cost){
|
|
|
+ if(this.deptBudgetList.cost>val){
|
|
|
+ this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ }
|
|
|
+ else{
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // if (this.deptBudgetList.warehouseType == 1) {
|
|
|
+ // this.deptBudgetList.inOutType = '采购入库'
|
|
|
+ // this.deptBudgetList.inOutTypeKey = '1'
|
|
|
+ // } else {
|
|
|
+ // this.deptBudgetList.inOutType = '退库'
|
|
|
+ // this.deptBudgetList.inOutTypeKey = '1'
|
|
|
+ // }
|
|
|
},
|
|
|
methods: {
|
|
|
+ qualityInspectorChange(e){
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
+ kkInput(val){debugger
|
|
|
+ console.log(val)
|
|
|
+ if(this.isGetCost){
|
|
|
+ if(this.deptBudgetList.cost>val){
|
|
|
+ this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
uploadSuccessHandle1(res) {
|
|
|
this.deptBudgetList.addressUrl = res.url
|
|
|
+ console.log(this.deptBudgetList.addressUrl)
|
|
|
},
|
|
|
dataFilter1(val) {
|
|
|
console.log(val)
|
|
@@ -686,6 +721,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
editClick(status) {
|
|
|
+ this.isGetCost = false
|
|
|
if (status == 1) {
|
|
|
this.disabled1 = !this.disabled1
|
|
|
} else {
|
|
@@ -923,7 +959,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.cost) {
|
|
|
+ if (!this.deptBudgetList.freight) {
|
|
|
this.$message({
|
|
|
message: '运费不能为空',
|
|
|
type: 'warning',
|
|
@@ -931,11 +967,11 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- this.deptBudgetList.cost < 0 ||
|
|
|
- this.deptBudgetList.cost > 100000 ||
|
|
|
- (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.cost).length -
|
|
|
- (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
+ this.deptBudgetList.freight < 0 ||
|
|
|
+ this.deptBudgetList.freight > 100000 ||
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.freight).length -
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') + 1) >
|
|
|
2)
|
|
|
) {
|
|
|
this.$message({
|
|
@@ -1440,19 +1476,20 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.cost) {
|
|
|
+ if (!this.deptBudgetList.freight) {
|
|
|
this.$message({
|
|
|
message: '运费不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
if (
|
|
|
- this.deptBudgetList.cost < 0 ||
|
|
|
- this.deptBudgetList.cost > 100000 ||
|
|
|
- (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.cost).length -
|
|
|
- (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
+ this.deptBudgetList.freight < 0 ||
|
|
|
+ this.deptBudgetList.freight > 100000 ||
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.freight).length -
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') + 1) >
|
|
|
2)
|
|
|
) {
|
|
|
this.$message({
|
|
@@ -1723,6 +1760,8 @@ export default {
|
|
|
sessionStorage.getItem('ws-pf_compId')
|
|
|
this.deptBudgetList.inOutFlag = 2
|
|
|
this.deptBudgetList.statusFlag = 1
|
|
|
+ let _data = JSON.parse(sessionStorage.getItem('winseaview-userInfo'))
|
|
|
+ this.dataList.backOffice = _data.content.showCompName+'-' +_data.content.staffName
|
|
|
addstorageputList(this.deptBudgetList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
@@ -1765,12 +1804,26 @@ export default {
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
- contractNoChange(e) {
|
|
|
+ contractNoChange(e) {debugger
|
|
|
for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
if (this.outContractNo[i].contractNo == e) {
|
|
|
this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
- this.deptBudgetList.cost = this.outContractNo[i].contractPrice
|
|
|
+ // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
|
|
|
+ this.cost = this.outContractNo[i].contractPrice
|
|
|
+ if(this.cost){
|
|
|
+ this.isGetCost = true
|
|
|
+ this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ }else{
|
|
|
+ this.isGetCost = false
|
|
|
+ this.deptBudgetList.cost = this.deptBudgetList.cost
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
+ if(this.outContractNo[i].inOutType=='移库入库'){
|
|
|
+ this.isSelectType = false
|
|
|
+ }else{
|
|
|
+ this.isSelectType = true
|
|
|
+ }
|
|
|
if (this.outContractNo[i].tranCarInfoList) {
|
|
|
this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
@@ -1846,10 +1899,16 @@ export default {
|
|
|
})
|
|
|
// 类型
|
|
|
if (this.deptBudgetList.warehouseType == '1') {
|
|
|
+ this.storageType = []
|
|
|
pullDown({ constId: 'CON5' })
|
|
|
.toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.storageType = response
|
|
|
+ .then((response) => {debugger
|
|
|
+ // this.storageType = response
|
|
|
+ for(let i = 0;i<response.length;i++){
|
|
|
+ if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
|
|
|
+ this.storageType.push(response[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
} else if (this.deptBudgetList.warehouseType == '2') {
|
|
|
pullDown({ constId: 'WARE1' })
|
|
@@ -1885,6 +1944,7 @@ export default {
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.options = response
|
|
|
+ this.qualityInspectorList = response
|
|
|
this.staffList = response
|
|
|
// this.agent = response
|
|
|
})
|