123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413 |
- //审核仓单
- <template>
- <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 ref="deptBudgetList" :rules="rules" :model="deptBudgetList" class="content2" :inline="true"
- label-position="right" label-width="120px">
- <!-- <ws-info-table class="el-table"> -->
- <div class="title1">申请信息</div>
- <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
- <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
- </el-form-item>
- <el-form-item label="名头" span="1" prop="taskNo" class="renown">
- <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" disabled filterable clearable>
- <el-option :label="item.compName" :value="item.compId" v-for="(item, index) in compOptionList" :Key="index">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
- <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" disabled filterable clearable>
- <el-option :label="item.warehouseName" :value="item.id" v-for="(item, index) in warehouseList" :key="index">
- </el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
- <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" disabled filterable clearable>
- <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 label="仓库地址" span="1" 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="货名" span="1">
- <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" disabled filterable clearable>
- <el-option v-for="(item, index) in goodsList" :key="index" :label="item.goodsName" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="grade" label="品级" span="1">
- <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled filterable clearable>
- <el-option label="一等" value="一等"></el-option>
- <el-option label="二等" value="二等"></el-option>
- <el-option label="三等" value="三等"></el-option>
- <el-option label="等外" value="等外"></el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
- <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
- </el-form-item>
- <el-form-item label="可用储量(吨)" span="1" 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="weight" class="forlist">
- <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" disabled></el-input>
- </el-form-item>
- <el-form-item label="折干重量(吨)" prop="weight" class="forlist">
- <el-input v-model="deptBudgetList.dryOutWeight" disabled placeholder="输入折干重量" size="small" >
- </el-input>
- </el-form-item>
- <el-form-item label="单价(元/吨)" span="1" prop="unitPrice" class="forlist" disabled>
- <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" disabled></el-input>
- </el-form-item>
- <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
- <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
- </el-input>
- </el-form-item>
- <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
- <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small" disabled></el-input>
- </el-form-item>
- <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
- <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small" disabled></el-input>
- </el-form-item>
- <div>附件</div>
- <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
- @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" :editable="false" />
- <div>外审部门</div>
- <el-form-item prop="bank" label="银行" span="1">
- <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" disabled filterable clearable>
- <el-option label="区域一" value="shanghai"></el-option>
- <el-option label="区域二" value="beijing"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
- <el-input v-model="deptBudgetList.three" placeholder="无" size="small" disabled></el-input>
- </el-form-item>
- <div>
- <el-button @click="outerVisible = true" type="primary">驳回</el-button>
- <el-button @click="outerVisible1 = true" type="primary">通过</el-button>
- </div>
- <div>审核记录</div>
- <el-table class="wenzi" :data="taskhistories" style="width: 100%">
- <el-table-column prop="operatorMajorRoleName" label="审核人">
- <template scope="scope">
- {{ scope.row.operatorMajorRoleName }}{{ scope.row.operatorName }}
- </template>
- </el-table-column>
- <el-table-column prop="inOutTaskNo" label="审核结果">
- <template scope="scope">
- <span v-if="scope.row.approved">通过</span>
- <span v-if="!scope.row.approved">驳回</span>
- </template>
- </el-table-column>
- <el-table-column prop="endTime" label="审核时间"></el-table-column>
- <el-table-column prop="auditMind" label="审核意见"></el-table-column>
- </el-table>
- <!-- </ws-info-table> -->
- </el-form>
- <WinseaContentModal v-model="outerVisible" title="驳回原因" @on-cancel="handleClose">
- <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入驳回原因,1~50个字" v-model="rejectText"></el-input>
- <div class="dialog-footer">
- <el-button @click="outerVisible = false">取 消</el-button>
- <el-button type="primary" @click="rejectSubmit">确定</el-button>
- </div>
- </WinseaContentModal>
- <WinseaContentModal v-model="outerVisible1" title="审核意见" @on-cancel="handleClose" class="sh-content">
- <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入审核意见,1~50个字" v-model="adoptText"></el-input>
- <div class="dialog-footer">
- <el-button @click="outerVisible1 = false">取 消</el-button>
- <el-button type="primary" @click="adoptSubmit">确定</el-button>
- </div>
- </WinseaContentModal>
- </div>
- </template>
- <script>
- import {
- getcompList
- } from '@/model/signIn/index'
- import {
- woekflowhandle
- } from '@/model/tasksport/index'
- import {
- getWarehouseReceiptLook,
- getWarehouseReceiptExamine,
- } from '@/model/tradeServicesManagement/index'
- import {
- selectWarehouseSelf
- } from '@/model/houseSelfCollect/index'
- import WsUpload from '@/components/WsUpload'
- export default {
- components: {
- WsUpload,
- },
- data() {
- return {
- deptBudgetList: {},
- size: 10,
- compId: localStorage.getItem('ws-pf_compId'),
- compOptionList: [],
- taskhistories: [],
- warehouseList: [],
- cwNumberList: [],
- goodsList: [],
- rules: {
- // unitPrice: [
- // { required: true, message: '单价不能为空!', trigger: 'blur' },
- // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
- // ],
- },
- outerVisible: false, //驳回
- outerVisible1: false, //通过
- rejectText: '', //驳回原因
- adoptText: '', //审核意见
- }
- },
- activated() {
- // this.id = this.$route.query.id
- this.getList(this.$route.query.id)
- this.getcompList()
- },
- methods: {
- //返回
- cancel() {
- this.$router.push({
- path: 'warehouseReceiptRegulation',
- })
- },
- handleClose() {
- if (this.outerVisible) {
- this.outerVisible = false
- }
- if (this.outerVisible1) {
- this.outerVisible1 = false
- }
- },
- //驳回
- rejectSubmit() {
- if (!this.rejectText || this.rejectText.length > 50) {
- this.$message.error('驳回原因不能为空且不能超出50字')
- return
- } else {
- woekflowhandle({
- taskId: this.deptBudgetList.taskId,
- approved: false,
- auditMind: this.rejectText,
- needReapply: true,
- })
- .toPromise()
- .then((response) => {
- this.$message.success('驳回成功')
- this.handleClose()
- this.$router.push({
- path: 'warehouseReceiptRegulation'
- })
- })
- }
- },
- // 提交
- adoptSubmit() {
- if (!this.adoptText || this.adoptText.length > 50) {
- this.$message.error('审核意见不能为空且不能超出50字')
- } else {
- woekflowhandle({
- taskId: this.deptBudgetList.taskId,
- approved: true,
- auditMind: this.adoptText,
- needReapply: false,
- })
- .toPromise()
- .then((response) => {
- this.$message.success('审核成功')
- this.handleClose()
- this.$router.push({
- path: 'warehouseReceiptRegulation'
- })
- })
- }
- },
- getcompList() {
- getcompList()
- .toPromise()
- .then((res) => {
- this.compOptionList = res
- this.deptBudgetList.renown = res[0].compName
- })
- .catch((err) => {})
- },
- getWarehouse() {
- //获取仓库
- 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.length != 0 ?
- response[0].positionInfos[0].binNumber :
- ''
- this.deptBudgetList.baseId =
- response[0].positionInfos.length != 0 ?
- response[0].positionInfos[0].baseId :
- ''
- 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.length != 0 ?
- response[0].goodsNameInfos[0].storage :
- ''
- // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
- this.deptBudgetList.useWeight = '10'
- this.deptBudgetList.goodsName =
- response[0].goodsNameInfos.length != 0 ?
- response[0].goodsNameInfos[0].goodsName :
- ''
- this.deptBudgetList.warehouseId = response[0].id
- if (!this.deptBudgetList.renown)
- this.deptBudgetList.renown = this.compOptionList[0].compName
- if (!this.deptBudgetList.renownId)
- this.deptBudgetList.renownId = this.compOptionList[0].compId
- this.deptBudgetList.bankId = 'bankId'
- this.deptBudgetList.threeId = 'threeId'
- this.deptBudgetList.warehouseNoId =
- response[0].positionInfos.length != 0 ?
- response[0].positionInfos[0].id :
- ''
- this.deptBudgetList.goodsNameKey =
- response[0].goodsNameInfos.length != 0 ?
- response[0].goodsNameInfos[0].goodsNameKey :
- ''
- })
- },
- getList(id) {
- //审核记录
- getWarehouseReceiptExamine({
- businessKey: id,
- workflowId: this.$route.query.workflowId,
- })
- .toPromise()
- .then((response) => {
- this.taskhistories = response
- })
- getWarehouseReceiptLook({
- id: id
- })
- .toPromise()
- .then((response) => {
- console.log('mdl;sgjkdl', response)
- this.deptBudgetList = response
- })
- .catch((req) => {
- // this.tableData = response.records
- this.$message.success('提交失败')
- })
- },
- // 附件改变事件
- onChange() {
- this.$refs.upload
- .handleSaveBill()
- .then(async (response) => {
- this.deptBudgetList.appendix = response
- console.log('dfvbgf', this.deptBudgetList.appendix)
- })
- .catch((res) => {
- EventBus.$emit('error', (JSON.parse(res) || {}).message)
- this.$refs.upload.clearFiles()
- })
- },
- },
- }
- </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;
- }
- /deep/.winsea__content-modal .winsea__content-modal__win-wrap {
- width: 30%;
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto;
- height: 210px;
- border-radius: 10px;
- .dialog-footer {
- text-align: center;
- margin-top: 30px;
- }
- }
- </style>
|