reviewWarehouseReceipt.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. //审核仓单
  2. <template>
  3. <div class="center">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left titleup">审核仓单</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
  10. style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
  11. </el-button>
  12. </el-col>
  13. </el-row>
  14. <el-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList" class="content2" :inline="true"
  15. label-position="right" label-width="120px">
  16. <!-- <ws-info-table class="el-table"> -->
  17. <div class="title1">申请信息</div>
  18. <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
  19. <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
  20. </el-form-item>
  21. <el-form-item label="名头" span="1" prop="taskNo" class="renown">
  22. <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" disabled filterable clearable>
  23. <el-option :label="item.compName" :value="item.compId" v-for="(item, index) in compOptionList" :Key="index">
  24. </el-option>
  25. </el-select>
  26. </el-form-item>
  27. <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
  28. <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" disabled filterable clearable>
  29. <el-option :label="item.warehouseName" :value="item.id" v-for="(item, index) in warehouseList" :key="index">
  30. </el-option>
  31. </el-select>
  32. </el-form-item>
  33. <!-- <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
  34. <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" disabled filterable clearable>
  35. <el-option :label="item.binNumber" :value="item.id" v-for="(item, index) in cwNumberList" :key="index">
  36. </el-option>
  37. </el-select>
  38. </el-form-item> -->
  39. <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
  40. <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
  41. </el-form-item>
  42. <el-form-item prop="goodsName" label="货名" span="1">
  43. <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" disabled filterable clearable>
  44. <el-option v-for="(item, index) in goodsList" :key="index" :label="item.goodsName" :value="item.id">
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item prop="grade" label="品级" span="1">
  49. <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled filterable clearable>
  50. <el-option label="一等" value="一等"></el-option>
  51. <el-option label="二等" value="二等"></el-option>
  52. <el-option label="三等" value="三等"></el-option>
  53. <el-option label="等外" value="等外"></el-option>
  54. </el-select>
  55. </el-form-item>
  56. <!-- <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
  57. <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
  58. </el-form-item>
  59. <el-form-item label="可用储量(吨)" span="1" prop="useWeight" class="forlist">
  60. <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
  61. </el-form-item> -->
  62. <el-form-item label="本单重量(吨)" span="1" prop="weight" class="forlist">
  63. <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" disabled></el-input>
  64. </el-form-item>
  65. <el-form-item label="折干重量(吨)" prop="weight" class="forlist">
  66. <el-input v-model="deptBudgetList.dryOutWeight" disabled placeholder="输入折干重量" size="small" >
  67. </el-input>
  68. </el-form-item>
  69. <el-form-item label="单价(元/吨)" span="1" prop="unitPrice" class="forlist" disabled>
  70. <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" disabled></el-input>
  71. </el-form-item>
  72. <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
  73. <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
  74. </el-input>
  75. </el-form-item>
  76. <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
  77. <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small" disabled></el-input>
  78. </el-form-item>
  79. <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
  80. <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small" disabled></el-input>
  81. </el-form-item>
  82. <div>附件</div>
  83. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
  84. @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" :editable="false" />
  85. <div>外审部门</div>
  86. <el-form-item prop="bank" label="银行" span="1">
  87. <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" disabled filterable clearable>
  88. <el-option label="区域一" value="shanghai"></el-option>
  89. <el-option label="区域二" value="beijing"></el-option>
  90. </el-select>
  91. </el-form-item>
  92. <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
  93. <el-input v-model="deptBudgetList.three" placeholder="无" size="small" disabled></el-input>
  94. </el-form-item>
  95. <div>
  96. <el-button @click="outerVisible = true" type="primary">驳回</el-button>
  97. <el-button @click="outerVisible1 = true" type="primary">通过</el-button>
  98. </div>
  99. <div>审核记录</div>
  100. <el-table class="wenzi" :data="taskhistories" style="width: 100%">
  101. <el-table-column prop="operatorMajorRoleName" label="审核人">
  102. <template scope="scope">
  103. {{ scope.row.operatorMajorRoleName }}{{ scope.row.operatorName }}
  104. </template>
  105. </el-table-column>
  106. <el-table-column prop="inOutTaskNo" label="审核结果">
  107. <template scope="scope">
  108. <span v-if="scope.row.approved">通过</span>
  109. <span v-if="!scope.row.approved">驳回</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column prop="endTime" label="审核时间"></el-table-column>
  113. <el-table-column prop="auditMind" label="审核意见"></el-table-column>
  114. </el-table>
  115. <!-- </ws-info-table> -->
  116. </el-form>
  117. <WinseaContentModal v-model="outerVisible" title="驳回原因" @on-cancel="handleClose">
  118. <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入驳回原因,1~50个字" v-model="rejectText"></el-input>
  119. <div class="dialog-footer">
  120. <el-button @click="outerVisible = false">取 消</el-button>
  121. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  122. </div>
  123. </WinseaContentModal>
  124. <WinseaContentModal v-model="outerVisible1" title="审核意见" @on-cancel="handleClose" class="sh-content">
  125. <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入审核意见,1~50个字" v-model="adoptText"></el-input>
  126. <div class="dialog-footer">
  127. <el-button @click="outerVisible1 = false">取 消</el-button>
  128. <el-button type="primary" @click="adoptSubmit">确定</el-button>
  129. </div>
  130. </WinseaContentModal>
  131. </div>
  132. </template>
  133. <script>
  134. import {
  135. getcompList
  136. } from '@/model/signIn/index'
  137. import {
  138. woekflowhandle
  139. } from '@/model/tasksport/index'
  140. import {
  141. getWarehouseReceiptLook,
  142. getWarehouseReceiptExamine,
  143. } from '@/model/tradeServicesManagement/index'
  144. import {
  145. selectWarehouseSelf
  146. } from '@/model/houseSelfCollect/index'
  147. import WsUpload from '@/components/WsUpload'
  148. export default {
  149. components: {
  150. WsUpload,
  151. },
  152. data() {
  153. return {
  154. deptBudgetList: {},
  155. size: 10,
  156. compId: localStorage.getItem('ws-pf_compId'),
  157. compOptionList: [],
  158. taskhistories: [],
  159. warehouseList: [],
  160. cwNumberList: [],
  161. goodsList: [],
  162. rules: {
  163. // unitPrice: [
  164. // { required: true, message: '单价不能为空!', trigger: 'blur' },
  165. // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
  166. // ],
  167. },
  168. outerVisible: false, //驳回
  169. outerVisible1: false, //通过
  170. rejectText: '', //驳回原因
  171. adoptText: '', //审核意见
  172. }
  173. },
  174. activated() {
  175. // this.id = this.$route.query.id
  176. this.getList(this.$route.query.id)
  177. this.getcompList()
  178. },
  179. methods: {
  180. //返回
  181. cancel() {
  182. this.$router.push({
  183. path: 'warehouseReceiptRegulation',
  184. })
  185. },
  186. handleClose() {
  187. if (this.outerVisible) {
  188. this.outerVisible = false
  189. }
  190. if (this.outerVisible1) {
  191. this.outerVisible1 = false
  192. }
  193. },
  194. //驳回
  195. rejectSubmit() {
  196. if (!this.rejectText || this.rejectText.length > 50) {
  197. this.$message.error('驳回原因不能为空且不能超出50字')
  198. return
  199. } else {
  200. woekflowhandle({
  201. taskId: this.deptBudgetList.taskId,
  202. approved: false,
  203. auditMind: this.rejectText,
  204. needReapply: true,
  205. })
  206. .toPromise()
  207. .then((response) => {
  208. this.$message.success('驳回成功')
  209. this.handleClose()
  210. this.$router.push({
  211. path: 'warehouseReceiptRegulation'
  212. })
  213. })
  214. }
  215. },
  216. // 提交
  217. adoptSubmit() {
  218. if (!this.adoptText || this.adoptText.length > 50) {
  219. this.$message.error('审核意见不能为空且不能超出50字')
  220. } else {
  221. woekflowhandle({
  222. taskId: this.deptBudgetList.taskId,
  223. approved: true,
  224. auditMind: this.adoptText,
  225. needReapply: false,
  226. })
  227. .toPromise()
  228. .then((response) => {
  229. this.$message.success('审核成功')
  230. this.handleClose()
  231. this.$router.push({
  232. path: 'warehouseReceiptRegulation'
  233. })
  234. })
  235. }
  236. },
  237. getcompList() {
  238. getcompList()
  239. .toPromise()
  240. .then((res) => {
  241. this.compOptionList = res
  242. this.deptBudgetList.renown = res[0].compName
  243. })
  244. .catch((err) => {})
  245. },
  246. getWarehouse() {
  247. //获取仓库
  248. selectWarehouseSelf({
  249. compId: this.compId,
  250. })
  251. .toPromise()
  252. .then((response) => {
  253. console.log('仓库信息', response)
  254. this.warehouseList = response
  255. this.deptBudgetList.warehouseName = response[0].warehouseName
  256. this.cwNumberList = response[0].positionInfos
  257. this.deptBudgetList.warehouseNo =
  258. response[0].positionInfos.length != 0 ?
  259. response[0].positionInfos[0].binNumber :
  260. ''
  261. this.deptBudgetList.baseId =
  262. response[0].positionInfos.length != 0 ?
  263. response[0].positionInfos[0].baseId :
  264. ''
  265. this.deptBudgetList.warehouseAddress =
  266. response[0].warehousePrivate +
  267. response[0].warehouseCity +
  268. response[0].warehouseArea +
  269. response[0].detailedAddress
  270. this.goodsList = response[0].goodsNameInfos
  271. this.deptBudgetList.nowWeight =
  272. response[0].goodsNameInfos.length != 0 ?
  273. response[0].goodsNameInfos[0].storage :
  274. ''
  275. // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
  276. this.deptBudgetList.useWeight = '10'
  277. this.deptBudgetList.goodsName =
  278. response[0].goodsNameInfos.length != 0 ?
  279. response[0].goodsNameInfos[0].goodsName :
  280. ''
  281. this.deptBudgetList.warehouseId = response[0].id
  282. if (!this.deptBudgetList.renown)
  283. this.deptBudgetList.renown = this.compOptionList[0].compName
  284. if (!this.deptBudgetList.renownId)
  285. this.deptBudgetList.renownId = this.compOptionList[0].compId
  286. this.deptBudgetList.bankId = 'bankId'
  287. this.deptBudgetList.threeId = 'threeId'
  288. this.deptBudgetList.warehouseNoId =
  289. response[0].positionInfos.length != 0 ?
  290. response[0].positionInfos[0].id :
  291. ''
  292. this.deptBudgetList.goodsNameKey =
  293. response[0].goodsNameInfos.length != 0 ?
  294. response[0].goodsNameInfos[0].goodsNameKey :
  295. ''
  296. })
  297. },
  298. getList(id) {
  299. //审核记录
  300. getWarehouseReceiptExamine({
  301. businessKey: id,
  302. workflowId: this.$route.query.workflowId,
  303. })
  304. .toPromise()
  305. .then((response) => {
  306. this.taskhistories = response
  307. })
  308. getWarehouseReceiptLook({
  309. id: id
  310. })
  311. .toPromise()
  312. .then((response) => {
  313. console.log('mdl;sgjkdl', response)
  314. this.deptBudgetList = response
  315. })
  316. .catch((req) => {
  317. // this.tableData = response.records
  318. this.$message.success('提交失败')
  319. })
  320. },
  321. // 附件改变事件
  322. onChange() {
  323. this.$refs.upload
  324. .handleSaveBill()
  325. .then(async (response) => {
  326. this.deptBudgetList.appendix = response
  327. console.log('dfvbgf', this.deptBudgetList.appendix)
  328. })
  329. .catch((res) => {
  330. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  331. this.$refs.upload.clearFiles()
  332. })
  333. },
  334. },
  335. }
  336. </script>
  337. <style lang="scss" scoped>
  338. /deep/.el-form-item__content {
  339. width: 400px;
  340. }
  341. /deep/.el-select {
  342. width: 100%;
  343. }
  344. .el-form {
  345. overflow: scroll;
  346. height: 94vh;
  347. }
  348. .bg-left {
  349. padding-left: 30px;
  350. }
  351. .bg-bottom {
  352. margin: 15px 0px;
  353. }
  354. .titleup {
  355. position: relative;
  356. }
  357. .titleup::before {
  358. content: '';
  359. display: inline-block;
  360. width: 5px;
  361. height: 30px;
  362. background: #5473e8;
  363. position: absolute;
  364. left: 0;
  365. }
  366. .bg-right {
  367. padding-right: 10px;
  368. text-align: right;
  369. }
  370. .center {
  371. background: #f6f7fc;
  372. }
  373. .content2 {
  374. background: white;
  375. // padding:0 200px;
  376. // text-align: center;
  377. padding-left: 40px;
  378. }
  379. .title1 {
  380. font-size: 20px;
  381. font-weight: 600;
  382. margin: 20px 0;
  383. }
  384. /deep/.winsea__content-modal .winsea__content-modal__win-wrap {
  385. width: 30%;
  386. position: absolute;
  387. top: 0;
  388. bottom: 0;
  389. left: 0;
  390. right: 0;
  391. margin: auto;
  392. height: 210px;
  393. border-radius: 10px;
  394. .dialog-footer {
  395. text-align: center;
  396. margin-top: 30px;
  397. }
  398. }
  399. </style>