warehouseManagementEdit.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. //编辑仓库
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">修改仓库信息</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="returnWarehouse()">返回</el-button>
  10. </el-col>
  11. </el-row>
  12. <div>
  13. <ws-form ref="deptBudgetList" :model="deptBudgetList">
  14. <el-radio-group v-model="warehouseType" @change="warehouseTypechange">
  15. <el-radio label="1">常用仓库</el-radio>
  16. <el-radio label="2">临时仓库</el-radio>
  17. </el-radio-group>
  18. <div class="small-title">基本信息</div>
  19. <!--基本信息-->
  20. <ws-info-table>
  21. <!--仓库名称-->
  22. <ws-form-item label="仓库名称" span="1" prop="warehouseName" class="readonly">
  23. <ws-select v-model="deptBudgetList.warehouseName" placeholder="" class="typeselect"
  24. @change="selectpackingMethod">
  25. <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.warehouseName"
  26. :value="item.warehouseName" />
  27. </ws-select>
  28. </ws-form-item>
  29. <!--负责人-->
  30. <ws-form-item label="负责人" span="1" prop="personCharge">
  31. <el-select v-model="deptBudgetList.personCharge" placeholder="请选择负责人" filterable clearable
  32. @change="selectstaff">
  33. <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
  34. </el-select>
  35. </ws-form-item>
  36. <!--负责人电话-->
  37. <ws-form-item label="负责人电话" span="1" prop="personPhone" class="readonly">
  38. <ws-input :readonly="true" v-model="deptBudgetList.personPhone" placeholder="请输入负责人电话" maxlength="100"
  39. size="small" />
  40. </ws-form-item>
  41. <!--其他负责人-->
  42. <ws-form-item label="其他负责人" v-if="warehouseType == 1" span="1" prop="otherPersonCharge">
  43. <el-select v-model="deptBudgetList.otherPersonPhone" placeholder="请选择其他负责人" @change="selectstaffOther"
  44. :filter-method="dataFilter1" filterable clearable multiple>
  45. <el-option v-for="item in optionsOther" :key="item.staffMobilePhone" :label="item.staffName"
  46. :value="item.staffMobilePhone " />
  47. </el-select>
  48. </ws-form-item>
  49. <!--仓库所在地-->
  50. <ws-form-item label="仓库所在地" span="1" prop="warehouseCity">
  51. <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" placeholder="请输入仓库所在地"
  52. style="width: 200%" @change="handleChange" />
  53. </ws-form-item>
  54. <!--详细地址-->
  55. <ws-form-item label="详细地址" span="1" prop="detailedAddress" class="readonly">
  56. <ws-input v-model="deptBudgetList.detailedAddress" placeholder="请输入详细地址" maxlength="100" size="small" />
  57. </ws-form-item>
  58. <!--总储量(吨)-->
  59. <ws-form-item v-if="warehouseType == 1" label="总储量(吨)" span="1" prop="totalStorage">
  60. {{ totalStorage }}
  61. </ws-form-item>
  62. <ws-form-item label="是否自动获取重量" span="1" prop="automaticWeightAcquisition" class="readonly" style="180px">
  63. <el-radio v-model="deptBudgetList.automaticWeightAcquisition" label="0">否</el-radio>
  64. <el-radio v-model="deptBudgetList.automaticWeightAcquisition" label="1">是</el-radio>
  65. </ws-form-item>
  66. </ws-info-table>
  67. <div v-for="(item, index) in deptBudgetList.warehousePositionInfoList">
  68. <ws-info-table>
  69. <!--仓位编号-->
  70. <ws-form-item label="仓位编号" span="1" prop="binNumber">
  71. <ws-input v-model="item.binNumber" placeholder="请输入仓位编号" maxlength="100" size="small" />
  72. </ws-form-item>
  73. <!--仓位储量(吨)-->
  74. <ws-form-item label="仓位储量(吨)" span="1" prop="maxStorage">
  75. <ws-input v-model="item.maxStorage" placeholder="请输入仓位储量(吨)" maxlength="20" size="small" />
  76. </ws-form-item>
  77. <!--备注(选填)-->
  78. <ws-form-item label="备注(选填)" span="1" prop=" remark">
  79. <ws-input v-model="item.remark" placeholder="请输入备注" maxlength="100" size="small" />
  80. </ws-form-item>
  81. <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
  82. <img width="22" height="22" class="del" @click="del(index, item)" src="../../../public/img/del.png"
  83. alt="" />
  84. </ws-info-table>
  85. </div>
  86. </ws-form>
  87. <ws-form ref="deptBudgetList" :model="deptBudgetList">
  88. <div v-if="warehouseType == 1" class="small-title">上传仓库照片</div>
  89. <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
  90. (res, file) => {
  91. uploadSuccessHandle(res)
  92. }
  93. " :on-remove="
  94. (value) => {
  95. handleRemove(value)
  96. }
  97. " class="avatar-uploader" accept=".jpg, .jpeg, .png, .gif">
  98. <el-button v-if="warehouseType == 1">上传附件</el-button>
  99. </el-upload>
  100. <div class="addressUrls" v-if="addressUrls != null">
  101. <div v-for="(item , index) in addressUrls" class="addressUrl" :key="index">
  102. <div @click='close(index)' class="iconfont icon-guanbi"></div>
  103. <el-image v-if="addressUrls != null"
  104. style="width: 100px; height: 100px"
  105. :src="item"
  106. :preview-src-list="addressUrls">
  107. </el-image>
  108. </div>
  109. </div>
  110. <div class="small-title">仓库定位</div>
  111. <map-drag @marker="marker" :isShowaddress='false' v-on:addressListen='getAddress'
  112. v-on:pickedAddress='searchAddress'></map-drag>
  113. </ws-form>
  114. <!-- <ws-button @click="exportlist()"></ws-button> -->
  115. </div>
  116. <div style="text-align: right; padding: 10px">
  117. <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">修改</el-button>
  118. </div>
  119. </div>
  120. </template>
  121. <script>
  122. import {
  123. getFileList,
  124. saveFiles
  125. } from '@/model/upload'
  126. import {
  127. getstafffind,
  128. } from '@/model/contarct/index'
  129. import {
  130. xiala,
  131. billoperatehis,
  132. getLook,
  133. edit,
  134. delPosition,
  135. getstaff
  136. } from '@/model/warehouse/index'
  137. import {
  138. regionData,
  139. CodeToText,
  140. TextToCode
  141. } from 'element-china-area-data'
  142. import {
  143. downloadFile
  144. } from '@/utils/batchDown'
  145. import Pagination from '@/components/Pagination'
  146. import WsUpload from '@/components/WsUpload'
  147. import mapDrag from '@/components/mapdrag/mapdrag'
  148. import {
  149. dayjs,
  150. fmoney,
  151. EventBus
  152. } from 'base-core-lib'
  153. export default {
  154. name: 'viewSpareMoney',
  155. components: {
  156. WsUpload,
  157. Pagination,
  158. mapDrag,
  159. },
  160. watch: {
  161. vesselId(val) {
  162. this.getList()
  163. },
  164. isShow(val) {
  165. this.showType = val
  166. },
  167. },
  168. data() {
  169. return {
  170. fileList: [],
  171. //弹出框
  172. dialogViewSpareMoney: false,
  173. dialogApproveFormVisible: false,
  174. // 船舶类型
  175. monetaryKey: null,
  176. // 表格显示数据
  177. tableDate: [],
  178. // 是否显示
  179. showType: true,
  180. // 年
  181. year: '',
  182. deptBudgetTotal: 0,
  183. currentPage: 1,
  184. pageSize: 10,
  185. searchType: 1,
  186. searchKeyWord: '',
  187. contractType: 2,
  188. startDate: null,
  189. endDate: null,
  190. warehouseType: '1',
  191. unitList: [],
  192. baseId: '',
  193. // 提交类型
  194. submitType: true,
  195. size: 10,
  196. options_: regionData,
  197. selectedOptions: [],
  198. compId: localStorage.getItem('ws-pf_compId'),
  199. deptCircularPage: {},
  200. packtypeList: [],
  201. date: {
  202. year: dayjs().format('YYYY'),
  203. month: dayjs().format('MM'),
  204. },
  205. staffList: [],
  206. contractList: [],
  207. deptBudgetList: {},
  208. historyList: [],
  209. appendixIdsAdd: '',
  210. pickerBeginDateBefore: {
  211. disabledDate: (time) => {
  212. return time.getTime() > Date.now()
  213. },
  214. },
  215. options: [],
  216. staffList1: [],
  217. optionsOther: [],
  218. value: '',
  219. accessoryTFs: false,
  220. addressUrls: [],
  221. }
  222. },
  223. activated() {
  224. this.loaddata()
  225. // getstafffind({
  226. // roles: 'd6a5c8a52da544309259f91f75de1ec6'
  227. // })
  228. // .toPromise()
  229. // .then((response) => {
  230. // this.options = response
  231. // this.optionsOther = response
  232. // this.staffList1 = response
  233. // this.staffList = response
  234. // })
  235. getstaff({
  236. compId: localStorage.getItem('ws-pf_compId')
  237. })
  238. .toPromise()
  239. .then((response) => {
  240. this.options = response
  241. this.optionsOther = response
  242. this.staffList = response
  243. this.staffList1 = response
  244. // for(var i=0;i<response.length;i++){
  245. // this.optionsOther.push(response[i].staffName+" "+response[i].staffMobilePhone)
  246. // }
  247. })
  248. this.showType = this.isShow
  249. },
  250. computed: {
  251. totalStorage: function() {
  252. var sum = 0
  253. if (this.deptBudgetList.warehousePositionInfoList) {
  254. for (
  255. var i = 0; i < this.deptBudgetList.warehousePositionInfoList.length; i++
  256. ) {
  257. sum += Number(
  258. this.deptBudgetList.warehousePositionInfoList[i].maxStorage
  259. )
  260. }
  261. }
  262. return sum
  263. },
  264. },
  265. methods: {
  266. getAddress(data) {
  267. console.log('getAddress', data)
  268. this.deptBudgetList.warehousePrivate = data[0]
  269. this.deptBudgetList.warehouseCity = data[1]
  270. this.deptBudgetList.warehouseArea = data[2]
  271. },
  272. searchAddress(e) {
  273. this.deptBudgetList.warehousePositioning = e.lat + ',' + e.lng
  274. },
  275. selectstaffOther(e) {
  276. this.deptBudgetList.otherPersonCharge = ''
  277. for (var i = 0; i < this.optionsOther.length; i++) {
  278. for (var j = 0; j < e.length; j++) {
  279. if (this.optionsOther[i].staffMobilePhone == e[j]) {
  280. this.deptBudgetList.otherPersonCharge += this.optionsOther[i].staffName + ' ' + this.optionsOther[i]
  281. .staffMobilePhone + ','
  282. }
  283. }
  284. }
  285. },
  286. close(index) {
  287. this.addressUrls.splice(index, 1)
  288. },
  289. dataFilter(val) {
  290. this.deptBudgetList.personCharge = val
  291. if (val) {
  292. //val存在
  293. this.options = this.staffList.filter((item) => {
  294. if (
  295. !!~item.staffName.indexOf(val) ||
  296. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  297. ) {
  298. return true
  299. }
  300. })
  301. } else {
  302. //val为空时,还原数组
  303. this.options = this.staffList
  304. }
  305. },
  306. dataFilter1(val) {
  307. this.deptBudgetList.personCharge = val
  308. if (val) {
  309. //val存在
  310. this.optionsOther = this.staffList1.filter((item) => {
  311. if (
  312. !!~item.staffName.indexOf(val) ||
  313. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  314. ) {
  315. return true
  316. }
  317. })
  318. } else {
  319. //val为空时,还原数组
  320. this.optionsOther = this.staffList1
  321. }
  322. },
  323. selectstaff(e) {
  324. for (var i = 0; i < this.staffList.length; i++) {
  325. if (this.staffList[i].staffName == e) {
  326. this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
  327. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  328. }
  329. }
  330. },
  331. //返回按钮
  332. returnWarehouse() {
  333. this.addressUrls = []
  334. this.deptBudgetList = {}
  335. this.selectedOptions = []
  336. this.$router.push({
  337. path: 'warehouseManagementList'
  338. })
  339. },
  340. handleChange(value) {
  341. console.log(value)
  342. this.selectedOptions = value
  343. },
  344. warehouseTypechange() {
  345. this.addressUrls = []
  346. this.deptBudgetList = {}
  347. this.selectedOptions = []
  348. this.loaddata()
  349. },
  350. marker: function(item) {
  351. this.deptBudgetList.warehousePositioning =
  352. item.lnglat.lat + ',' + item.lnglat.lng
  353. },
  354. selectedAddress(e) {
  355. this.deptBudgetList.warehousePositioning =
  356. e.center.lat + ',' + e.center.lng
  357. },
  358. uploadSuccess(data, files, url) {
  359. this.fileList = files
  360. console.log('uploadSuccess ', data, files, url)
  361. },
  362. onChange(files) {
  363. this.fileNum = files
  364. this.$refs.upload.handleSaveBill().then((res) => {
  365. console.log(files)
  366. })
  367. },
  368. handleClose() {
  369. this.accessoryTFs = false
  370. },
  371. handleSizeChange(val) {
  372. console.log(`每页 ${val} 条`)
  373. this.pageSize = val
  374. this.getList()
  375. },
  376. handleCurrentChange(val) {
  377. this.currentPage = val
  378. console.log(`当前页: ${val}`)
  379. this.getList()
  380. },
  381. selectpackingMethod(e) {
  382. for (var i = 0; i < this.packtypeList.length; i++) {
  383. if (this.packtypeList[i].warehouseName == e) {
  384. this.baseId = this.packtypeList[i].id
  385. this.getLook(this.packtypeList[i].id)
  386. }
  387. }
  388. },
  389. add() {
  390. this.deptBudgetList.warehousePositionInfoList.push({
  391. binNumber: '',
  392. maxStorage: '',
  393. remark: '',
  394. })
  395. },
  396. del(index, item) {
  397. if (item.nowStorage > 0) {
  398. this.$message.warning('尚有剩余库存,不可删除')
  399. } else {
  400. this.$confirm(`此操作将永久删除该仓位的全部信息,是否确定删除`, {
  401. confirmButtonText: '确定',
  402. cancelButtonText: '取消',
  403. type: 'warning',
  404. })
  405. .then(() => {
  406. if (item.id) {
  407. delPosition({
  408. id: item.id
  409. })
  410. .toPromise()
  411. .then((response) => {
  412. this.$message.success('删除成功')
  413. })
  414. .catch((response) => {
  415. EventBus.$emit(
  416. 'error',
  417. this.$t('showMessage.asteriskRequired')
  418. )
  419. })
  420. }
  421. if (this.deptBudgetList.warehousePositionInfoList.length > 1) {
  422. this.deptBudgetList.warehousePositionInfoList.splice(index, 1)
  423. }
  424. })
  425. .catch(() => {
  426. return false
  427. })
  428. }
  429. },
  430. loaddata() {
  431. // 仓库名称
  432. xiala({
  433. compId: localStorage.getItem('ws-pf_compId'),
  434. warehouseType: this.warehouseType,
  435. })
  436. .toPromise()
  437. .then((response) => {
  438. this.packtypeList = response
  439. })
  440. },
  441. getUnitList() {
  442. xiala({
  443. compId: localStorage.getItem('ws-pf_compId'),
  444. constCode: 'TYPEYAN',
  445. })
  446. .toPromise()
  447. .then((response) => {
  448. this.unitList = response
  449. let currItem
  450. this.unitList.forEach((item, index, arr) => {
  451. item.flag = 'delete'
  452. if (this.vModel == item.constKey) {
  453. currItem = item
  454. this.getLook(currItem.compId)
  455. }
  456. })
  457. //
  458. if (currItem) {
  459. this.getLook(currItem.compId)
  460. }
  461. })
  462. },
  463. getLook(compId1) {
  464. getLook({
  465. id: compId1,
  466. })
  467. .toPromise()
  468. .then((response) => {
  469. var tmp = []
  470. if(response.warehousePrivate&&response.warehousePrivate&&response.warehouseCity){
  471. tmp[0] = TextToCode[response.warehousePrivate].code
  472. if(response.warehouseCity!=''){
  473. tmp[1] =
  474. TextToCode[response.warehousePrivate][response.warehouseCity].code
  475. tmp[2] =
  476. TextToCode[response.warehousePrivate][response.warehouseCity][
  477. response.warehouseArea
  478. ].code
  479. }else{
  480. tmp[1]=TextToCode[response.warehousePrivate]['市辖区'].code
  481. tmp[2] =
  482. TextToCode[response.warehousePrivate]['市辖区'][
  483. response.warehouseArea
  484. ].code
  485. }
  486. }
  487. this.selectedOptions = tmp
  488. this.deptBudgetList = response
  489. // if(this.deptBudgetList.addressUrl){
  490. // this.fileList = this._getFileList(this.deptBudgetList.addressUrl)
  491. // }
  492. if(this.deptBudgetList.addressUrl){
  493. this.addressUrls = this.deptBudgetList.addressUrl.split(',')
  494. }else{
  495. this.addressUrls = []
  496. }
  497. if(this.deptBudgetList.otherPersonPhone!=''){
  498. this.deptBudgetList.otherPersonPhone = this.deptBudgetList.otherPersonPhone.split(',')
  499. }else{
  500. this.deptBudgetList.otherPersonPhone = []
  501. }
  502. this.addressUrls.pop()
  503. })
  504. },
  505. // 传入appendixIds 从服务器获取文件列表信息
  506. _getFileList(appendixIds) {
  507. return new Promise(async (next) => {
  508. try {
  509. next((await getFileList({
  510. appendixIds
  511. }).toPromise()) || [])
  512. } catch (error) {
  513. next()
  514. }
  515. })
  516. },
  517. uploadSuccessHandle(e) {
  518. this.deptBudgetList.addressUrl += e.url + ','
  519. this.addressUrls.push(e.url)
  520. },
  521. //提交
  522. submit() {
  523. if (!this.deptBudgetList.warehouseName) {
  524. this.$message({
  525. message: '仓库名称不能为空!',
  526. type: 'warning',
  527. })
  528. return
  529. }
  530. if (
  531. this.deptBudgetList.warehouseName.length < 2 ||
  532. this.deptBudgetList.warehouseName.length > 20
  533. ) {
  534. this.$message({
  535. message: '仓库名长度不符合要求!',
  536. type: 'warning',
  537. })
  538. return
  539. }
  540. if (!this.deptBudgetList.personCharge) {
  541. this.$message({
  542. message: '负责人不能为空!',
  543. type: 'warning',
  544. })
  545. return
  546. }
  547. if (
  548. this.deptBudgetList.personCharge.length < 2 ||
  549. this.deptBudgetList.personCharge.length > 10
  550. ) {
  551. this.$message({
  552. message: '负责人长度不符合要求,请控制在2-10字符之内',
  553. type: 'warning',
  554. })
  555. return
  556. }
  557. if (!this.deptBudgetList.personPhone) {
  558. this.$message({
  559. message: '负责人电话不能为空!',
  560. type: 'warning',
  561. })
  562. return
  563. }
  564. if (this.deptBudgetList.personPhone.length != 11) {
  565. this.$message({
  566. message: '手机号输入有误!',
  567. type: 'warning',
  568. })
  569. return
  570. }
  571. if (!this.deptBudgetList.detailedAddress) {
  572. this.$message({
  573. message: '详细地址不能为空!',
  574. type: 'warning',
  575. })
  576. return
  577. }
  578. if (!this.deptBudgetList.warehousePositioning) {
  579. this.$message({
  580. message: '仓库定位不能为空!',
  581. type: 'warning',
  582. })
  583. return
  584. }
  585. if (this.warehouseType == 1) {
  586. if (this.totalStorage <= 0) {
  587. this.$message({
  588. message: '仓位储量不能为空!',
  589. type: 'warning',
  590. })
  591. return
  592. }
  593. }
  594. if (
  595. this.deptBudgetList.detailedAddress.length < 2 ||
  596. this.deptBudgetList.detailedAddress.length > 20
  597. ) {
  598. this.$message({
  599. message: '详细地址长度不符合要求,请控制在2-20字符之内',
  600. type: 'warning',
  601. })
  602. return
  603. }
  604. for (
  605. var i = 0; i < this.deptBudgetList.warehousePositionInfoList.length; i++
  606. ) {
  607. for (
  608. var j = i + 1; j < this.deptBudgetList.warehousePositionInfoList.length; j++
  609. ) {
  610. console.log(
  611. this.deptBudgetList.warehousePositionInfoList[i].binNumber,
  612. this.deptBudgetList.warehousePositionInfoList[j].binNumber
  613. )
  614. if (
  615. this.deptBudgetList.warehousePositionInfoList[i].binNumber ==
  616. this.deptBudgetList.warehousePositionInfoList[j].binNumber
  617. ) {
  618. this.$message({
  619. message: '仓位编号重复',
  620. type: 'warning',
  621. })
  622. return
  623. }
  624. }
  625. }
  626. this.$refs.deptBudgetList.validate((valid) => {
  627. if (valid) {
  628. this.deptBudgetList.warehousePrivate =
  629. CodeToText[this.selectedOptions[0]]
  630. this.deptBudgetList.warehouseCity =
  631. CodeToText[this.selectedOptions[1]]
  632. this.deptBudgetList.warehouseArea =
  633. CodeToText[this.selectedOptions[2]]
  634. this.deptBudgetList.warehouseType = this.warehouseType
  635. this.deptBudgetList.baseId = this.baseId
  636. this.deptBudgetList.compId = this.compId
  637. this.deptBudgetList.contractType = 1
  638. this.deptBudgetList.otherPersonPhone = this.deptBudgetList.otherPersonPhone.toString()
  639. edit(this.deptBudgetList)
  640. .toPromise()
  641. .then((response) => {
  642. this.$message.success('编辑成功')
  643. this.deptBudgetList = {}
  644. this.warehouseType = '1'
  645. this.$router.push({
  646. path: 'warehouseManagementList'
  647. })
  648. })
  649. } else {
  650. //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  651. return false
  652. }
  653. })
  654. new Promise((resolve, reject) => {
  655. const newAppendixs = this.fileList
  656. const params = {
  657. newAppendixs
  658. }
  659. saveFiles(params)
  660. .toPromise()
  661. .then((res) => {
  662. resolve(res.join())
  663. })
  664. .catch((err) => {
  665. EventBus.$emit('error', this.$t('showMessage.saveFilesError'))
  666. reject()
  667. })
  668. })
  669. },
  670. // 关闭 dialog时 处理文件url 初始化upload组件
  671. handleCloe() {
  672. this.dialogViewSpareMoney = false
  673. },
  674. history(row) {
  675. console.log(row)
  676. billoperatehis({
  677. id: row.id
  678. })
  679. .toPromise()
  680. .then((response) => {
  681. this.historyList = response
  682. })
  683. },
  684. //删除
  685. approve() {},
  686. listQuery() {},
  687. total() {},
  688. clearfiltQuery() {},
  689. selectCrtDuty() {},
  690. },
  691. }
  692. </script>
  693. <style lang="scss" scoped>
  694. /deep/.totalStorage .el-input__inner {
  695. color: #afb5cb;
  696. background: #f5f7fa;
  697. }
  698. .small-title {
  699. position: relative;
  700. padding: 10px;
  701. font-weight: 600;
  702. }
  703. .small-title::before {
  704. position: absolute;
  705. content: '';
  706. display: block;
  707. background: #5473e8;
  708. width: 4px;
  709. height: 14px;
  710. left: 0px;
  711. top: 13px;
  712. }
  713. .position {
  714. position: relative;
  715. }
  716. .add,
  717. .del {
  718. position: absolute;
  719. right: -38px;
  720. top: 9px;
  721. cursor: pointer;
  722. }
  723. .del {
  724. right: -70px;
  725. }
  726. .amap-page-container {
  727. width: 300px;
  728. height: 300px;
  729. }
  730. .el-form {
  731. padding: 0 15%;
  732. }
  733. /deep/.ws-info-table .el-form-item {
  734. border-right: 1px solid transparent;
  735. border-bottom: 1px solid transparent;
  736. }
  737. .readonly {
  738. position: relative;
  739. }
  740. .readonly:after {
  741. content: '*';
  742. color: #ff2727;
  743. position: absolute;
  744. right: 8px;
  745. z-index: 10;
  746. top: 21%;
  747. font-size: 20px;
  748. }
  749. .title {
  750. position: relative;
  751. }
  752. .title::before {
  753. content: '';
  754. display: inline-block;
  755. width: 5px;
  756. height: 30px;
  757. background: #5473e8;
  758. position: absolute;
  759. left: 0;
  760. }
  761. .ws-info-table {
  762. border-left: 1px solid transparent;
  763. border-top: 1px solid transparent;
  764. }
  765. .el-button--primary {
  766. background-color: #5878e8;
  767. border-color: #5878e8;
  768. }
  769. .el-col {
  770. background: #f6f7fc;
  771. }
  772. /deep/.ws-info-table .el-form-item .el-form-item__content {
  773. padding: 0 25px;
  774. border-left: 1px solid transparent;
  775. background: #fff;
  776. }
  777. /deep/.ws-info-table .el-form-item .el-form-item__label {
  778. width: 130px;
  779. text-align: center;
  780. background: #fff;
  781. // border: 1px solid #cdd2dc;
  782. }
  783. .button-container {
  784. display: flex;
  785. flex-wrap: nowrap;
  786. justify-content: space-between;
  787. align-items: center;
  788. background-color: #fff;
  789. width: 100%;
  790. height: 50px;
  791. padding: 0 10px;
  792. &>div {
  793. margin-left: 10px;
  794. display: flex;
  795. flex-wrap: nowrap;
  796. flex-direction: row;
  797. &>span {
  798. line-height: 50px;
  799. }
  800. }
  801. /deep/.auditFlow-box {
  802. position: unset;
  803. margin-left: 10px;
  804. &/deep/.auditFlow-icon {
  805. width: auto;
  806. padding-right: 30px;
  807. }
  808. &/deep/.auditFlow-main {
  809. position: absolute;
  810. }
  811. }
  812. }
  813. .box-app {
  814. display: inline-block;
  815. float: left;
  816. margin-left: 30px;
  817. line-height: 50px;
  818. }
  819. /deep/.el-dialog {
  820. .el-form-item {
  821. margin-bottom: 0 !important;
  822. .el-input--medium {
  823. textarea {
  824. min-height: 100px !important;
  825. }
  826. }
  827. }
  828. }
  829. .collapse-bottom {
  830. margin-bottom: 20px;
  831. }
  832. .input-main .textarea .el-textarea__inner {
  833. width: 100%;
  834. z-index: 1;
  835. }
  836. .bg-left {
  837. padding-left: 30px;
  838. }
  839. .bg-right {
  840. padding-right: 10px;
  841. text-align: right;
  842. }
  843. .bg-bottom {
  844. margin: 15px 0px;
  845. }
  846. .wenzi {
  847. width: 900px;
  848. margin: 0 auto;
  849. }
  850. .wenzi h3 {
  851. display: inline-block;
  852. left: 10px;
  853. }
  854. .wenzi p {
  855. display: inline-block;
  856. }
  857. .center {
  858. width: 900px;
  859. margin: 0 auto;
  860. }
  861. .el-form-item {
  862. width: 50%;
  863. }
  864. .el-form-item__label {
  865. text-align: center;
  866. }
  867. .ce {
  868. width: 900px;
  869. margin: 0 auto;
  870. }
  871. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  872. /* height: 82px;*/
  873. /*}*/
  874. // 控制select为只读的时候显示样式
  875. .hide-sel {
  876. .el-input__inner {
  877. border: 0px;
  878. }
  879. .el-icon-arrow-up {
  880. display: none;
  881. }
  882. .el-textarea__inner {
  883. background-color: #fff !important;
  884. border: 0;
  885. }
  886. .el-date-editor {
  887. i {
  888. display: none;
  889. }
  890. }
  891. .is-disabled {
  892. .el-input__inner:hover {
  893. background-color: #fff !important;
  894. border: 0;
  895. }
  896. color: #606266;
  897. .el-input__inner {
  898. background-color: #fff !important;
  899. border: 0;
  900. color: #606266;
  901. }
  902. .el-textarea__inner {
  903. background-color: #fff !important;
  904. border: 0;
  905. color: #606266;
  906. }
  907. }
  908. }
  909. // 控制select为只读的时候显示样式
  910. /deep/.ws-class-table-col {
  911. height: auto;
  912. padding: 0px 2px;
  913. /deep/.el-input__inner {
  914. padding: 0px 2px;
  915. }
  916. }
  917. /deep/.is-disabled {
  918. .el-input__prefix,
  919. .el-input__suffix {
  920. display: none;
  921. }
  922. .el-input__inner {
  923. background-color: #fff;
  924. border-color: #fff !important;
  925. color: #000 !important;
  926. font-size: 14px;
  927. cursor: text;
  928. padding: 0 !important;
  929. }
  930. }
  931. .winseaview-view {
  932. padding: 0 0 20px;
  933. }
  934. .container {
  935. overflow: scroll;
  936. height: 93vh;
  937. }
  938. .ws-info-table .el-form-item {
  939. width: 33.3333%;
  940. }
  941. .readonly:after {
  942. display: none;
  943. }
  944. .el-textarea__inner {
  945. display: none;
  946. }
  947. .el-form {
  948. margin-top: 50px;
  949. }
  950. .readonly {
  951. width: 16%;
  952. }
  953. .ws-info-table .el-form-item {
  954. width: 33.33%;
  955. }
  956. //去边框
  957. /deep/.el-form-item {
  958. border-right: 0px;
  959. border-bottom: 0px;
  960. }
  961. /deep/.ws-info-table {
  962. border-left: 0px;
  963. border-top: 0px;
  964. }
  965. .ws-info-table .el-form-item .el-form-item__content {
  966. border-right: 0px;
  967. border-bottom: 0px;
  968. border-left: 0px;
  969. border-top: 0px;
  970. }
  971. /deep/.ws-info-table .el-form-item {
  972. border-right: 0px;
  973. border-bottom: 0px;
  974. border-left: 0px;
  975. border-top: 0px;
  976. }
  977. /deep/.ws-info-table .el-form-item .el-form-item__content {
  978. background: #f5f7fa;
  979. border-radius: 4px;
  980. border: 1px solid #d8dce6;
  981. font-family: PingFangSC-Regular, PingFang SC;
  982. margin-bottom: 5px;
  983. background-color: #fff;
  984. font-size: 14px;
  985. font-weight: 400;
  986. color: #8890b1;
  987. line-height: 16px;
  988. }
  989. /deep/.ws-info-table .el-form-item .el-form-item__label {
  990. background-color: #fff;
  991. font-size: 14px;
  992. font-family: PingFangSC-Regular, PingFang SC;
  993. font-weight: 400;
  994. color: #8890b1;
  995. line-height: 16px;
  996. }
  997. /deep/.ws-info-table .el-form-item .el-form-item__content {
  998. border: 0px;
  999. }
  1000. .addressUrls {
  1001. width: 100%;
  1002. display: flex;
  1003. margin-top: 10px;
  1004. }
  1005. .addressUrl {
  1006. margin: 0 10px;
  1007. border-radius: 3px;
  1008. }
  1009. .addressUrls-item {
  1010. position: relative;
  1011. }
  1012. .icon-guanbi {
  1013. position: absolute;
  1014. right: 0;
  1015. }
  1016. </style>