warehouseReceiptAdd.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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 :inline="true" ref="deptBudgetList" label-position="right" class="content2" :rules="rules"
  15. :model="deptBudgetList" label-width="120px">
  16. <div class="title1">申请信息</div>
  17. <!-- <ws-info-table class="el-table"> -->
  18. <el-form-item label="业务编号" prop="billNo" class="forlist">
  19. <el-col>
  20. <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled>
  21. </el-input>
  22. </el-col>
  23. </el-form-item>
  24. <el-form-item label="名头" prop="renown" class="forlist">
  25. <el-input v-model="deptBudgetList.renown" placeholder="请输入名头" maxlength="20" size="small" >
  26. </el-input>
  27. <!-- <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" @change="changeCompOptionList" filterable clearable>
  28. <el-option :label="item.compName" :key="index" :value="item.compId" v-for="(item,index) in compOptionList">
  29. </el-option>
  30. </el-select> -->
  31. </el-form-item>
  32. <el-form-item label="仓库名称" prop="warehouseName" class="forlist">
  33. <el-select v-model="deptBudgetList.warehouseName" filterable placeholder="请选择仓库" @change="changeWarehouse" clearable>
  34. <el-option v-for="(item,index) in warehouseList" :key='index' :label="item.warehouseName" :value="item.warehouseName">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. <!-- <el-form-item label="仓位号" prop="warehouseNo" class="forlist">
  39. <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" @change="changeWarehouseNo" filterable clearable>
  40. <el-option :label="item.binNumber" :value="item.binNumber" v-for="(item,index) in cwNumberList" :key='index'>
  41. </el-option>
  42. </el-select>
  43. </el-form-item> -->
  44. <el-form-item label="仓库地址" prop="warehouseAddress" class="forlist">
  45. <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
  46. </el-form-item>
  47. <el-form-item prop="goodsName" label="货名">
  48. <el-select disabled v-model="deptBudgetList.goodsName" placeholder="自动获取,不可编辑" @change="dataFlush" filterable clearable>
  49. <el-option v-for="item in goodsList" :key="item.goodsName" :label="item.goodsName"
  50. :value="item.goodsName" >
  51. </el-option>
  52. </el-select>
  53. </el-form-item>
  54. <!-- <el-form-item prop="grade" label="品级">
  55. <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" filterable clearable>
  56. <el-option label="一等" value="一等"></el-option>
  57. <el-option label="二等" value="二等"></el-option>
  58. <el-option label="三等" value="三等"></el-option>
  59. <el-option label="等外" value="等外"></el-option>
  60. </el-select>
  61. </el-form-item> -->
  62. <!-- <el-form-item label="现有储量" prop="nowWeight" class="forlist">
  63. <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
  64. </el-form-item>
  65. <el-form-item label="可用储量(吨)" prop="useWeight" class="forlist">
  66. <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
  67. </el-form-item> -->
  68. <el-form-item label="货源" prop="weight" class="forlist supplyofgoods">
  69. <el-input disabled v-model="goodstext" placeholder="" size="small" @input='inputChange'>
  70. </el-input>
  71. <el-button @click='selectgoods' type="primary">选择货源</el-button>
  72. </el-form-item>
  73. <el-form-item label="本单重量(吨)" prop="weight" class="forlist">
  74. <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" >
  75. </el-input>
  76. </el-form-item>
  77. <el-form-item label="折干重量(吨)" prop="weight" class="forlist">
  78. <el-input v-model="deptBudgetList.dryOutWeight" placeholder="输入折干重量" size="small" @input='inputChange'>
  79. </el-input>
  80. </el-form-item>
  81. <el-form-item label="单价(元/吨)" prop="unitPrice" class="forlist">
  82. <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" @input='inputChange'></el-input>
  83. </el-form-item>
  84. <el-form-item label="货值(元)" prop="totalValue" class="forlist">
  85. <el-input type='number' disabled v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
  86. </el-form-item>
  87. <el-form-item label="申请金额(元)" prop="interest" class="forlist">
  88. <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
  89. </el-form-item>
  90. <div>附件</div>
  91. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
  92. @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  93. <div>外审部门</div>
  94. <el-form-item prop="bank" label="银行">
  95. <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange">
  96. <el-option :label="item.constValue" :value="item.constValue" v-for="(item,index) in bankList" :key="index"></el-option>
  97. </el-select>
  98. </el-form-item>
  99. <el-form-item label="第三方" span="1" prop="three" class="forlist">
  100. <el-select v-model="deptBudgetList.three" placeholder="无" @change="threeChange" filterable clearable>
  101. <el-option :label="item1.constValue" :value="item1.constValue" v-for="(item1,index) in threeList" :key="index"></el-option>
  102. <!-- <el-option label="第三方2" value="three2"></el-option> -->
  103. </el-select>
  104. </el-form-item>
  105. <div>
  106. <el-button @click='inoutput' type="primary" :disabled="!deptBudgetList.goodsName">出入库记录</el-button>
  107. <el-button @click='submit' type="primary">提交审核</el-button>
  108. </div>
  109. <!-- </ws-info-table> -->
  110. </el-form>
  111. </div>
  112. </template>
  113. <script>
  114. import {
  115. getcompList,
  116. } from '@/model/signIn/index'
  117. import {
  118. addList,
  119. getbillno,
  120. WarehouseReceiptBankList,
  121. } from '@/model/tradeServicesManagement/index'
  122. import {
  123. xiala
  124. } from '@/model/warehouse/index'
  125. import {
  126. getcomp
  127. } from '@/model/indexRx'
  128. import * as global from '@/global'
  129. import WsUpload from '@/components/WsUpload'
  130. export default {
  131. components: {
  132. WsUpload,
  133. },
  134. data() {
  135. return {
  136. deptBudgetList: {
  137. goodsName:'',
  138. goodsNameKey:'',
  139. useWeight:'',
  140. nowWeight:'',
  141. warehouseNo:'',
  142. warehouseName:'',
  143. renown:'',
  144. weight:'',
  145. interest:''
  146. },
  147. size: 10,
  148. compId: '',
  149. warehouseList: [],
  150. compOptionList: [],
  151. cwNumberList: [],
  152. goodsList: [],
  153. db:{},
  154. goodstext:'已选0辆车',
  155. rules: {
  156. // unitPrice: [
  157. // { required: true, message: '单价不能为空!', trigger: 'blur' },
  158. // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
  159. // ],
  160. },
  161. bankList:[],
  162. threeList:[],
  163. }
  164. },
  165. async activated() {
  166. this.compId = localStorage.getItem('ws-pf_compId')
  167. this.deptBudgetList.compId = this.compId
  168. this.deptBudgetList.renownId = this.compId
  169. this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
  170. //
  171. let i = localStorage.getItem('pageUp')
  172. this.getList()
  173. // getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
  174. console.log(localStorage.getItem('ws-pf_compName'))
  175. this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
  176. // })
  177. this.db=await global.default.openDB('warehouseReceipt')
  178. if(localStorage.getItem('warehouseReceiptdata')){
  179. this.deptBudgetList=JSON.parse(localStorage.getItem('warehouseReceiptdata'))
  180. var data=await global.default.getDataByKey(this.db,'signalChat',1)
  181. if(data){
  182. this.deptBudgetList.weight=''
  183. var weight = 0
  184. var pureWeight = 0
  185. if(data.modification&&data.modification.length>0){
  186. this.goodstext='已选'+data.modification.length+'辆车'
  187. for(let i=0;i<data.modification.length;i++){
  188. weight+=data.modification[i].netWeight
  189. pureWeight+=data.modification[i].pureWeight
  190. }
  191. this.deptBudgetList.goodsName = data.modification[0].goodsName
  192. this.dataFlush()
  193. this.deptBudgetList.weight = weight.toFixed(2)
  194. if(this.deptBudgetList.goodsName.indexOf('潮粮')!=-1){
  195. this.deptBudgetList.dryOutWeight = pureWeight.toFixed(2)
  196. }else{
  197. this.deptBudgetList.dryOutWeight = weight.toFixed(2)
  198. }
  199. if( this.deptBudgetList.unitPrice){
  200. this.inputChange()
  201. }
  202. }
  203. }
  204. }
  205. // console.log(this.deptBudgetList)
  206. },
  207. methods: {
  208. selectgoods(){
  209. localStorage.setItem('warehouseReceiptdata',JSON.stringify(this.deptBudgetList))
  210. this.$router.push({
  211. name: 'warehouseReceiptgoods',
  212. query: {
  213. baseId: this.deptBudgetList.baseId,
  214. positionId: this.deptBudgetList.warehouseNoId,
  215. warehouseName: this.deptBudgetList.warehouseName,
  216. warehouseType: this.deptBudgetList.warehouseType,
  217. warehouseNo:this.deptBudgetList.warehouseNo,
  218. }
  219. })
  220. },
  221. inputChange(e) {
  222. if (this.deptBudgetList.unitPrice && this.deptBudgetList.dryOutWeight) {
  223. this.deptBudgetList.totalValue = Number(this.deptBudgetList.unitPrice * this.deptBudgetList.dryOutWeight).toFixed(2)
  224. this.$set(this.deptBudgetList,'interest',this.deptBudgetList.totalValue)
  225. }
  226. },
  227. //银行改变
  228. bankChange(e){
  229. this.deptBudgetList.bank = e
  230. },
  231. //第三方
  232. threeChange(e){
  233. this.deptBudgetList.three = e
  234. },
  235. getList() {
  236. // this.deptBudgetList.grade = '二等'
  237. WarehouseReceiptBankList({constId:'BANK1'}).toPromise().then((response) => {
  238. this.bankList = response
  239. })
  240. WarehouseReceiptBankList({constId:'THREE1'}).toPromise().then((response) => {
  241. this.threeList = response
  242. })
  243. // 获取业务编号
  244. getbillno().toPromise().then((response) => {
  245. this.deptBudgetList.billNo = localStorage.getItem('ws-pf_compDomainName')+response
  246. })
  247. this.getWarehouse()
  248. },
  249. getcompList() {
  250. //获取公司名头
  251. getcompList()
  252. .toPromise()
  253. .then((res) => {
  254. this.compOptionList = res
  255. // this.deptBudgetList.renown = res[0].compName
  256. this.changeCompOptionList(res[0].compId)
  257. })
  258. .catch((err) => {})
  259. },
  260. getWarehouse() {
  261. //获取仓库
  262. xiala({
  263. compId: this.compId,
  264. warehouseType:1
  265. }).toPromise()
  266. .then(response => {
  267. console.log(response,76)
  268. this.warehouseList = response
  269. if(!this.deptBudgetList.warehouseName){
  270. this.deptBudgetList.warehouseName = response[0].warehouseName
  271. this.deptBudgetList.warehouseType = response[0].warehouseType
  272. this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity + response[0].warehouseArea + response[0].detailedAddress
  273. if(response[0].positionInfos){
  274. this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].id : ''
  275. this.cwNumberList = response[0].positionInfos
  276. this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].binNumber : ''
  277. this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].baseId : ''
  278. }
  279. if(response[0].goodsNameInfos){
  280. this.goodsList = []
  281. for(let i = 0 ; i < response[0].goodsNameInfos.length ; i++){
  282. if(response[0].goodsNameInfos[i].binNumber == this.deptBudgetList.warehouseNo ){
  283. this.goodsList.push(response[0].goodsNameInfos[i])
  284. }
  285. }
  286. }
  287. this.deptBudgetList.warehouseId = response[0].id
  288. }
  289. if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
  290. if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
  291. })
  292. },
  293. //货名切换
  294. // changeGoodsName(val) {
  295. // let _data = this.goodsList
  296. // for (let i = 0; i < _data.length; i++) {
  297. // if (_data[i].goodsName == val) {
  298. // this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
  299. // this.deptBudgetList.goodsName = _data[i].goodsName
  300. // this.deptBudgetList.nowWeight = _data[i].storage
  301. // this.deptBudgetList.useWeight = _data[i].useStorage
  302. // }
  303. // }
  304. // },
  305. dataFlush(){
  306. for (let i = 0; i < this.warehouseList.length; i++) {
  307. if (this.warehouseList[i].warehouseName == this.deptBudgetList.warehouseName) {
  308. let tmpGoodsName = this.warehouseList[i].goodsNameInfos;
  309. for(let j = 0;j<tmpGoodsName.length;j++){
  310. if(tmpGoodsName[j].binNumber == this.deptBudgetList.warehouseNo){
  311. if(tmpGoodsName[j].goodsName == this.deptBudgetList.goodsName){
  312. this.deptBudgetList.useWeight = tmpGoodsName[j].useStorage;
  313. this.deptBudgetList.nowWeight = tmpGoodsName[j].storage;
  314. }
  315. }
  316. }
  317. }
  318. }
  319. },
  320. //银行切换
  321. changeBank(val) {
  322. this.deptBudgetList.bankId = 'changebankId'
  323. },
  324. //第三方切换
  325. changeThree(val) {
  326. this.deptBudgetList.threeId = 'changethreeId'
  327. },
  328. //仓位号切换
  329. changeWarehouseNo(val) {
  330. debugger
  331. let _data = this.cwNumberList
  332. for (let i = 0; i < _data.length; i++) {
  333. if (_data[i].binNumber == val) {
  334. this.deptBudgetList.warehouseNoId = _data[i].id
  335. this.deptBudgetList.warehouseNo = _data[i].binNumber
  336. this.deptBudgetList.baseId = _data.baseId
  337. }
  338. }
  339. this.goodsList = []
  340. for(let j = 0 ; j < this.warehouseList.length ; j++){
  341. if(this.deptBudgetList.warehouseName == this.warehouseList[j].warehouseName){
  342. for(let _num = 0 ; _num < this.warehouseList[j].goodsNameInfos.length; _num++ ){
  343. if( this.deptBudgetList.warehouseNo == this.warehouseList[j].goodsNameInfos[_num].binNumber){
  344. this.goodsList.push(this.warehouseList[j].goodsNameInfos[_num])
  345. }
  346. }
  347. }
  348. }
  349. },
  350. // 名头切换
  351. changeCompOptionList(val) {
  352. let _data = this.compOptionList
  353. for (let i = 0; i < _data.length; i++) {
  354. if (_data[i].compId == val) {
  355. this.deptBudgetList.renownId = _data[i].compId
  356. this.deptBudgetList.renown = _data[i].compName
  357. this.compId = val
  358. this.getWarehouse()
  359. }
  360. }
  361. },
  362. //仓库切换
  363. async changeWarehouse(val) {
  364. let _data = this.warehouseList
  365. for (let i = 0; i < _data.length; i++) {
  366. if (_data[i].warehouseName == val) {
  367. var data=await global.default.getDataByKey(this.db,'signalChat',1)
  368. if(data){
  369. if(data.modification&&data.modification.length>0){
  370. global.default.deleteDB(this.db,'signalChat',1)
  371. this.deptBudgetList.weight = ''
  372. this.deptBudgetList.dryOutWeight = ''
  373. }
  374. }
  375. this.goodstext='已选0辆车'
  376. this.deptBudgetList.warehouseName = _data[i].warehouseName
  377. this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
  378. this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
  379. this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
  380. // this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
  381. this.deptBudgetList.warehouseId = _data[i].id
  382. this.deptBudgetList.warehouseType = _data[i].warehouseType
  383. this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].id : ''
  384. this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
  385. }
  386. }
  387. console.log('切换后仓库数据', this.deptBudgetList.warehouseId)
  388. this.changeWarehouseNo(this.deptBudgetList.warehouseId)
  389. },
  390. inoutput() {
  391. this.$router.push({
  392. name: 'inOutRecord',
  393. query: {
  394. baseId: this.deptBudgetList.baseId,
  395. positionId: this.deptBudgetList.warehouseNoId,
  396. warehouseName: this.deptBudgetList.warehouseName,
  397. warehouseNo:this.deptBudgetList.warehouseNo,
  398. nowWeight:this.deptBudgetList.nowWeight
  399. }
  400. })
  401. },
  402. validate() {
  403. function _Validate(min, max, saveNum, type, inputVal) {
  404. let _val1 = inputVal
  405. let _pointVal1 = _val1.toString().split('.')[1]
  406. if (_pointVal1 == undefined) _pointVal1 = 0
  407. if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
  408. if (Number(_val1) <= Number(max) && Number(_val1) >= Number(min) && _pointVal1 <= saveNum) {
  409. return false
  410. }
  411. return true
  412. }
  413. if (!this.deptBudgetList.weight) {
  414. this.$message.error('本单重量不能为空!');
  415. return false
  416. }
  417. if (!this.deptBudgetList.unitPrice || _Validate(1, 20000, 3, '', this.deptBudgetList
  418. .unitPrice)) {
  419. if (!this.deptBudgetList.unitPrice) {
  420. this.$message.error('单价不能为空!');
  421. } else {
  422. this.$message.error('单价输入错误,1-20000之间,最多保留3位小数!');
  423. }
  424. return false
  425. }
  426. if (!this.deptBudgetList.totalValue) {
  427. this.$message.error('总价值不能为空!');
  428. return false
  429. }
  430. // if (!this.deptBudgetList.applicationProportion || _Validate(10, 100, 2, '', this.deptBudgetList
  431. // .applicationProportion)) {
  432. // if (!this.deptBudgetList.applicationProportion) {
  433. // this.$message.error('申请比例不能为空!');
  434. // } else {
  435. // this.$message.error('申请比例输入错误,10-100之间,最多保留2位小数!');
  436. // }
  437. // return false
  438. // }
  439. if (!this.deptBudgetList.interest || _Validate(1, 1000000000, 2, '', this.deptBudgetList
  440. .interest)) {
  441. if (!this.deptBudgetList.interest) {
  442. this.$message.error('申请金额不能为空!');
  443. } else {
  444. this.$message.error('申请金额输入错误,1-10亿之间,最多保留2位小数!');
  445. }
  446. return false
  447. }
  448. if (!this.deptBudgetList.appendix) {
  449. console.log(this.deptBudgetList.appendix)
  450. this.$message.error('附件不能为空!');
  451. return false
  452. } else if (this.deptBudgetList.appendix.split(',').length > 30) {
  453. this.$message.error('附件数量需小于30!');
  454. return false
  455. }
  456. if (!this.deptBudgetList.bank) {
  457. this.$message.error('银行不能为空!');
  458. return false
  459. }
  460. // if (!this.deptBudgetList.three) {
  461. // this.$message.error('第三方不能为空!')
  462. // return false
  463. // }
  464. return true
  465. },
  466. async submit() {
  467. var data=await global.default.getDataByKey(this.db,'signalChat',1)
  468. if(data){
  469. if(data.modification){
  470. this.deptBudgetList.warehouseInOutInfoList=data.modification
  471. }
  472. }
  473. let isValidate = false
  474. console.log(this.validate())
  475. isValidate = this.validate()
  476. console.log(isValidate)
  477. if (isValidate) {
  478. this.$confirm(`确定提交审核?`, {
  479. cancelButtonText: '取消',
  480. confirmButtonText: '确定',
  481. type: 'warning',
  482. }).then(() => {
  483. addList(this.deptBudgetList).toPromise().then((response) => {
  484. // this.tableData = response.records
  485. localStorage.removeItem('pageUp')
  486. localStorage.removeItem('warehouseReceiptdata')
  487. this.$message.success('提交成功')
  488. global.default.deleteDB(this.db,'signalChat',1)
  489. this.$router.push({
  490. path: 'warehouseReceiptRegulation'
  491. })
  492. }).catch((req) => {
  493. // this.tableData = response.records
  494. this.$message.error('提交失败')
  495. })
  496. })
  497. }
  498. },
  499. onChange() {
  500. this.$refs.upload
  501. .handleSaveBill()
  502. .then(async response => {
  503. this.deptBudgetList.appendix = response
  504. })
  505. .catch(res => {
  506. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  507. this.$refs.upload.clearFiles()
  508. })
  509. },
  510. cancel() {
  511. localStorage.removeItem('pageUp')
  512. localStorage.removeItem('pageUp')
  513. localStorage.removeItem('warehouseReceiptdata')
  514. global.default.deleteDB(this.db,'signalChat',1)
  515. this.$router.push({
  516. path: 'warehouseReceiptRegulation'
  517. })
  518. },
  519. },
  520. }
  521. </script>
  522. <style lang="scss" scoped>
  523. /deep/.el-form-item__content {
  524. width: 400px;
  525. }
  526. /deep/.el-select {
  527. width: 100%;
  528. }
  529. .el-form {
  530. overflow: scroll;
  531. height: 94vh;
  532. }
  533. .bg-left {
  534. padding-left: 30px;
  535. }
  536. .bg-bottom {
  537. margin: 15px 0px;
  538. }
  539. .titleup {
  540. position: relative;
  541. }
  542. .titleup::before {
  543. content: '';
  544. display: inline-block;
  545. width: 5px;
  546. height: 30px;
  547. background: #5473e8;
  548. position: absolute;
  549. left: 0;
  550. }
  551. .bg-right {
  552. padding-right: 10px;
  553. text-align: right;
  554. }
  555. .center {
  556. background: #f6f7fc;
  557. }
  558. .content2 {
  559. background: white;
  560. // padding:0 200px;
  561. // text-align: center;
  562. padding-left: 40px;
  563. }
  564. .title1 {
  565. font-size: 20px;
  566. font-weight: 600;
  567. margin: 20px 0;
  568. }
  569. .supplyofgoods .el-input{
  570. width:75%;
  571. }
  572. </style>