|
@@ -1,84 +1,97 @@
|
|
|
//创建仓单
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <el-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
|
|
|
+ <div class="center">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <h2 class="bg-left titleup">创建仓单</h2>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="bg-right">
|
|
|
+ <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
|
|
|
+ style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-form :inline="true" ref="deptBudgetList" label-position="right" class="content2" :rules="rules"
|
|
|
+ :model="deptBudgetList" label-width="120px">
|
|
|
+ <div class="title1">申请信息</div>
|
|
|
<!-- <ws-info-table class="el-table"> -->
|
|
|
- <div>申请信息</div>
|
|
|
- <el-form-item label="业务编号" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.taskNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="名头" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择名头">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="业务编号" prop="billNo" class="forlist">
|
|
|
+ <el-col>
|
|
|
+ <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled>
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="仓库名称" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择仓库">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item label="名头" prop="renown" class="forlist">
|
|
|
+ <el-select v-model="deptBudgetList.renown" placeholder="请选择名头">
|
|
|
+ <el-option :label="item.compName" :key="item.compId" :value="item.compId"
|
|
|
+ v-for="(item,index) in compOptionList"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="仓位号" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择仓位号">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item label="仓库名称" prop="warehouseName" class="forlist">
|
|
|
+ <el-select v-model="deptBudgetList.warehouseName" filterable placeholder="请选择仓库" @change="changeWarehouse">
|
|
|
+ <el-option v-for="item in warehouseList" :key='item.id' :label="item.warehouseName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="仓库地址" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input disabled v-model="deptBudgetList.goodsName" placeholder="请输入仓库地址" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="goodsName" label="货名" span="1">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item label="仓位号" prop="warehouseNo" class="forlist">
|
|
|
+ <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号">
|
|
|
+ <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'>
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="goodsName" label="货名" span="1">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item label="仓库地址" prop="warehouseAddress" class="forlist">
|
|
|
+ <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="goodsName" label="货名">
|
|
|
+ <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名">
|
|
|
+ <el-option v-for="item in goodsList" :key='item.id' :label="item.goodsName" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="goodsName" label="品级" span="1">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择品级">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item prop="goodsName" label="品级">
|
|
|
+ <el-select v-model="deptBudgetList.grade" placeholder="请选择品级">
|
|
|
+ <el-option label="一等" value="one"></el-option>
|
|
|
+ <el-option label="二等" value="two"></el-option>
|
|
|
+ <el-option label="三等" value="three"></el-option>
|
|
|
+ <el-option label="等外" value="out"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="现有储量" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input disabled v-model="deptBudgetList.goodsName" placeholder="请输入现有储量" size="small"></el-input>
|
|
|
+ <el-form-item label="现有储量" prop="nowWeight" class="forlist">
|
|
|
+ <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="可用储量(吨)" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input disabled v-model="deptBudgetList.goodsName" placeholder="请输入可用储量" size="small"></el-input>
|
|
|
+ <el-form-item label="可用储量(吨)" prop="useWeight" class="forlist">
|
|
|
+ <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="本单重量(吨)" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.goodsName" placeholder="输入本次仓单申请所需的重量" size="small"></el-input>
|
|
|
+ <el-form-item label="本单重量(吨)" prop="weight" class="forlist">
|
|
|
+ <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="单价(元/吨)" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.goodsName" placeholder="输入粮食单价" size="small"></el-input>
|
|
|
+ <el-form-item label="单价(元/吨)" prop="unitPrice" class="forlist">
|
|
|
+ <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="总价值(元)" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.goodsName" placeholder="自动计算,不可编辑" size="small"></el-input>
|
|
|
+ <el-form-item label="总价值(元)" prop="totalValue" class="forlist">
|
|
|
+ <el-input v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="申请比例(%)" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.goodsName" placeholder="输入申请比例" size="small"></el-input>
|
|
|
+ <el-form-item label="申请比例(%)" prop="applicationProportion" class="forlist">
|
|
|
+ <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="申请金额(元)" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.goodsName" placeholder="输入申请金额" size="small"></el-input>
|
|
|
+ <el-form-item label="申请金额(元)" prop="interest" class="forlist">
|
|
|
+ <el-input v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
<div>附件</div>
|
|
|
- <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
|
|
|
+ <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
|
|
|
@onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
|
|
|
<div>外审部门</div>
|
|
|
- <el-form-item prop="goodsName" label="银行" span="1">
|
|
|
- <el-select v-model="deptBudgetList.region" placeholder="请选择银行">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item prop="bank" label="银行">
|
|
|
+ <el-select v-model="deptBudgetList.bank" placeholder="请选择银行">
|
|
|
+ <el-option label="中国银行" value="bank"></el-option>
|
|
|
+ <el-option label="营口银行" value="bank"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
|
|
|
- <el-input v-model="deptBudgetList.goodsName" placeholder="无" size="small"></el-input>
|
|
|
+ <el-form-item label="第三方" span="1" prop="three" class="forlist">
|
|
|
+ <el-select v-model="deptBudgetList.three" placeholder="请选择银行">
|
|
|
+ <el-option label="第三方1" value="bank"></el-option>
|
|
|
+ <el-option label="第三方2" value="bank"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<div>
|
|
|
<el-button @click='inoutput' type="primary">出入库记录</el-button>
|
|
@@ -91,8 +104,15 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
- getList,
|
|
|
+ getcompList,
|
|
|
+ } from '@/model/signIn/index'
|
|
|
+ import {
|
|
|
+ addList,
|
|
|
+ getbillno
|
|
|
} from '@/model/tradeServicesManagement/index'
|
|
|
+ import {
|
|
|
+ selectWarehouseSelf,
|
|
|
+ } from '@/model/houseSelfCollect/index'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -100,40 +120,176 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- deptBudgetList: {},
|
|
|
+ deptBudgetList: {
|
|
|
+ warehouseName: '',
|
|
|
+ warehouseNo: '',
|
|
|
+ compId:sessionStorage.getItem('ws-pf_compId')
|
|
|
+ },
|
|
|
size: 10,
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ warehouseList: [],
|
|
|
+ compOptionList: [],
|
|
|
+ cwNumberList: [],
|
|
|
+ goodsList: [],
|
|
|
+ rules: {
|
|
|
+ // name: [
|
|
|
+ // { required: true, message: '请输入活动名称', trigger: 'blur' },
|
|
|
+ // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
|
|
+ // ],
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
-
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getList() {
|
|
|
+ this.deptBudgetList.grade = '二等'
|
|
|
+ // 获取业务编号
|
|
|
+ getbillno().toPromise().then((response) => {
|
|
|
+ this.deptBudgetList.billNo = response
|
|
|
+ })
|
|
|
+ //获取仓库
|
|
|
+ selectWarehouseSelf({
|
|
|
+ compId: this.compId
|
|
|
+ }).toPromise()
|
|
|
+ .then(response => {
|
|
|
+ console.log('仓库信息', response)
|
|
|
+ this.warehouseList = response
|
|
|
+ this.deptBudgetList.warehouseName = response[0].warehouseName
|
|
|
+ this.cwNumberList = response[0].positionInfos
|
|
|
+ this.deptBudgetList.warehouseNo = response[0].positionInfos[0].binNumber
|
|
|
+ this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity +
|
|
|
+ response[0].warehouseArea + response[0].detailedAddress
|
|
|
+ this.goodsList = response[0].goodsNameInfos
|
|
|
+ this.deptBudgetList.nowWeight = response[0].goodsNameInfos[0].storage
|
|
|
+ // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
|
|
|
+ this.deptBudgetList.useWeight = '10'
|
|
|
+ this.deptBudgetList.goodsName = response[0].goodsNameInfos[0].goodsName
|
|
|
+ })
|
|
|
+ //获取公司名头
|
|
|
+ getcompList()
|
|
|
+ .toPromise()
|
|
|
+ .then((res) => {
|
|
|
+ console.log('公司下拉列表数据', res)
|
|
|
+ this.compOptionList = res
|
|
|
+ this.deptBudgetList.renown = res[0].compName
|
|
|
+ })
|
|
|
+ .catch((err) => {})
|
|
|
+ },
|
|
|
+ //仓库切换
|
|
|
+ changeWarehouse(val) {debugger
|
|
|
+ console.log('切换后仓库数据', val)
|
|
|
+ let _data = this.warehouseList
|
|
|
+ for (let i = 0; i < _data.length; i++) {
|
|
|
+ if (_data[i].id == val) {
|
|
|
+ this.deptBudgetList.warehouseName = _data[i].warehouseName
|
|
|
+ this.cwNumberList =_data[i].positionInfos.length!=0?_data[i].positionInfos:[]
|
|
|
+ this.deptBudgetList.warehouseNo = _data[i].positionInfos.length!=0?_data[i].positionInfos[0].binNumber:''
|
|
|
+ this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity +
|
|
|
+ _data[i].warehouseArea + _data[i].detailedAddress
|
|
|
+ this.goodsList =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos:[]
|
|
|
+ this.deptBudgetList.nowWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].storage:''
|
|
|
+ // this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
|
|
|
+ this.deptBudgetList.useWeight ='10'
|
|
|
+ this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].goodsName:''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
inoutput() {
|
|
|
this.$router.push({
|
|
|
name: 'inOutRecord'
|
|
|
})
|
|
|
},
|
|
|
submit() {
|
|
|
-
|
|
|
+ this.$confirm(`确定提交审核?`, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(() => {debugger
|
|
|
+ addList(this.deptBudgetList).toPromise().then((response) => {
|
|
|
+ // this.tableData = response.records
|
|
|
+ this.$message.success('提交成功')
|
|
|
+ }).catch((req) => {
|
|
|
+ // this.tableData = response.records
|
|
|
+ this.$message.success('提交失败')
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
onChange() {
|
|
|
this.$refs.upload
|
|
|
.handleSaveBill()
|
|
|
.then(async response => {
|
|
|
- this.deptBudgetList.addressUrl = response
|
|
|
+ this.deptBudgetList.appendix = response
|
|
|
})
|
|
|
.catch(res => {
|
|
|
EventBus.$emit('error', (JSON.parse(res) || {}).message)
|
|
|
this.$refs.upload.clearFiles()
|
|
|
})
|
|
|
},
|
|
|
+ cancel() {
|
|
|
+ this.$router.push({
|
|
|
+ path: 'warehouseReceiptRegulation'
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ /deep/.el-form-item__content {
|
|
|
+ width: 400px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-select {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
.el-form {
|
|
|
overflow: scroll;
|
|
|
height: 94vh;
|
|
|
}
|
|
|
+
|
|
|
+ .bg-left {
|
|
|
+ padding-left: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-bottom {
|
|
|
+ margin: 15px 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .titleup {
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .titleup::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-right {
|
|
|
+ padding-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ .center {
|
|
|
+ background: #f6f7fc;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content2 {
|
|
|
+ background: white;
|
|
|
+ // padding:0 200px;
|
|
|
+ // text-align: center;
|
|
|
+ padding-left: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title1 {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 600;
|
|
|
+ margin: 20px 0;
|
|
|
+ }
|
|
|
</style>
|