You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
216 lines
5.8 KiB
216 lines
5.8 KiB
![]()
2 years ago
|
<template>
|
||
|
<div>
|
||
|
|
||
|
<div class="tab-header webtop">
|
||
|
<!-- 标题 -->
|
||
|
<div>出库记录信息</div>
|
||
|
<!-- start 添加修改按钮 -->
|
||
|
<div>
|
||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||
|
</div>
|
||
|
<!-- end 添加修改按钮 -->
|
||
|
<!-- end 详情按钮 -->
|
||
|
</div>
|
||
|
|
||
|
<div>
|
||
|
|
||
|
<el-card class="box-card">
|
||
|
<div class="item">
|
||
|
<span class="item_text">合同编号:</span>
|
||
|
<el-input v-model="formobj.salesContractNumber" placeholder="" class="item_input" clearable />
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">合同日期:</span>
|
||
|
<el-date-picker v-model="formobj.contractSigningDate" type="date" format="yyyy-MM-dd" class="item_input"
|
||
|
value-format="yyyy-MM-dd" placeholder="请选择" />
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">出库日期:</span>
|
||
|
<el-date-picker v-model="formobj.deliveryDate" type="date" format="yyyy-MM-dd" class="item_input"
|
||
|
value-format="yyyy-MM-dd" placeholder="请选择" />
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">油罐编号:</span>
|
||
|
<el-select v-model="formobj.tankName" filterable placeholder="请选择油罐编号" class="item_input" @change="getTank">
|
||
|
<el-option v-for="item in tankList" :key="item.sid" :label="item.name" :value="item.sid" />
|
||
|
</el-select>
|
||
|
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">原油种类:</span>
|
||
|
<el-input v-model="formobj.oilType" placeholder="" :readonly="true" class="item_input" clearable />
|
||
|
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">净重:</span>
|
||
|
<el-input v-model="formobj.weight" placeholder="" class="item_input" clearable />
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">价值:</span>
|
||
|
<el-input v-model="formobj.value" placeholder="" class="item_input" clearable />
|
||
|
</div>
|
||
|
<div class="item">
|
||
|
<span class="item_text">备注:</span>
|
||
|
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
|
||
|
</div>
|
||
|
</el-card>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import req from '@/api/inAndOutBound/inAndOutBound'
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
submitdisabled: false,
|
||
|
tankLists: [],
|
||
|
tankList: [],
|
||
|
formobj: {
|
||
|
sid: "",
|
||
|
salesContractNumber: "",
|
||
|
contractSigningDate: "",
|
||
|
deliveryDate: "",
|
||
|
tankName: "",
|
||
|
tankSid: "",
|
||
|
oilType: "",
|
||
|
weight: "",
|
||
|
value: "",
|
||
|
remarks:"",
|
||
|
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
created() {
|
||
|
this.getTankList()
|
||
|
},
|
||
|
methods: {
|
||
|
getTankList() {
|
||
|
req.tankList().then((res) => {
|
||
|
if (res.success) {
|
||
|
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
|
||
|
this.tankLists = res.data
|
||
|
for (var i = 0; i < this.tankLists.length; i++) {
|
||
|
|
||
|
let item = {
|
||
|
name: this.tankLists[i].number,
|
||
|
sid: this.tankLists[i].sid,
|
||
|
|
||
|
}
|
||
|
this.tankList.push(item)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
saveOrUpdate() {
|
||
|
req.outAddInfo(this.formobj)
|
||
|
.then(resp => {
|
||
|
if (resp.success) {
|
||
|
this.$message({
|
||
|
showClose: true,
|
||
|
type: 'success',
|
||
|
message: resp.msg
|
||
|
})
|
||
|
this.handleReturn("true")
|
||
|
} else {
|
||
|
// 根据resp.code进行异常情况处理
|
||
|
}
|
||
|
})
|
||
|
.catch(() => {})
|
||
|
|
||
|
},
|
||
|
handleReturn(isreload) {
|
||
|
if (isreload === 'true') this.$emit('reloadlist')
|
||
|
this.formobj = {
|
||
|
sid: "",
|
||
|
salesContractNumber: "",
|
||
|
contractSigningDate: "",
|
||
|
deliveryDate: "",
|
||
|
tankName: "",
|
||
|
tankSid: "",
|
||
|
oilType: "",
|
||
|
weight: "",
|
||
|
value: "",
|
||
|
remarks:"",
|
||
|
|
||
|
}
|
||
|
this.$emit('doback')
|
||
|
},
|
||
|
getTank(value) {
|
||
|
console.log(">>>>>>>>>getType", value)
|
||
|
const choose = this.tankLists.filter((item) => item.sid === value)
|
||
|
console.log(">>>>>>>>>getType", choose[0])
|
||
|
this.formobj.tankSid = choose[0].sid
|
||
|
this.formobj.oilType = choose[0].crudeName
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
<style lang="scss">
|
||
|
.box-card {
|
||
|
margin-left: 60px;
|
||
|
margin-right: 60px;
|
||
|
min-width: 70%;
|
||
|
margin-top: 20px;
|
||
|
|
||
|
.item {
|
||
|
display: flex;
|
||
|
flex-direction: row;
|
||
|
align-items: center;
|
||
|
margin-top: 15px;
|
||
|
height: 40px;
|
||
|
line-height: 40px;
|
||
|
|
||
|
.item_text {
|
||
|
flex: 0.8;
|
||
|
font-size: 18px;
|
||
|
text-align: right;
|
||
|
}
|
||
|
|
||
|
.item_input {
|
||
|
flex: 4;
|
||
|
font-size: 16px;
|
||
|
margin-left: 10px;
|
||
|
margin-right: 80px;
|
||
|
}
|
||
|
|
||
|
.item_left_input {
|
||
|
width: 20%;
|
||
|
}
|
||
|
|
||
|
.item_left_text {
|
||
|
height: 30px;
|
||
|
margin-left: 20px;
|
||
|
line-height: 30px;
|
||
|
color: #018AD2;
|
||
|
padding: 0px 15px;
|
||
|
border: 1.5px solid #018AD2;
|
||
|
border-radius: 5px;
|
||
|
|
||
|
}
|
||
|
|
||
|
.item_right {
|
||
|
flex: 1;
|
||
|
justify-items: center;
|
||
|
|
||
|
.item_right_list_text {
|
||
|
font-size: 16px;
|
||
|
}
|
||
|
|
||
|
.item_right_list_delect {
|
||
|
color: #5E94FF;
|
||
|
margin-left: 20px;
|
||
|
font-size: 16px;
|
||
|
text-decoration: underline;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
</style>
|