warehouseManagementAdd.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. <template>
  2. <div class="container">
  3. <el-row>
  4. <el-col :span="12">
  5. <h2 class="bg-left title">创建仓库</h2>
  6. </el-col>
  7. <el-col :span="12" class="bg-right">
  8. <el-button
  9. class="bg-bottom"
  10. type="primary"
  11. size="small"
  12. @click="returnsales()"
  13. ><img
  14. width="6"
  15. height="10"
  16. style="vertical-align: bottom; margin-right: 3px"
  17. src="../../../public/img/lujing.png"
  18. alt=""
  19. />返回</el-button
  20. >
  21. </el-col>
  22. </el-row>
  23. <ws-form
  24. class="position"
  25. ref="deptBudgetList"
  26. :rules="rules"
  27. :model="deptBudgetList"
  28. >
  29. <el-radio-group v-model="radio">
  30. <el-radio :label="1">自有库</el-radio>
  31. <el-radio :label="2">临时库</el-radio>
  32. </el-radio-group>
  33. <!-- <el-radio v-model="radio" label="1" checked="true">自有库</el-radio>
  34. <el-radio v-model="radio" label="2">临时库</el-radio> -->
  35. <div class="small-title">基本信息</div>
  36. <ws-info-table>
  37. <!--仓库名称-->
  38. <ws-form-item label="仓库名称" span="1" prop="warehouseName">
  39. <ws-input
  40. v-model="deptBudgetList.warehouseName"
  41. placeholder="请输入仓库名"
  42. maxlength="20"
  43. size="small"
  44. />
  45. </ws-form-item>
  46. <!--负责人-->
  47. <ws-form-item label="负责人" span="1" prop="personCharge">
  48. <el-select
  49. v-model="deptBudgetList.personCharge"
  50. placeholder="请选择负责人"
  51. filterable
  52. :filter-method="dataFilter"
  53. @change="selectstaff"
  54. >
  55. <el-option
  56. v-for="item in personCharge"
  57. :key="item.value"
  58. :label="item.staffName"
  59. :value="item.staffName"
  60. />
  61. </el-select>
  62. </ws-form-item>
  63. <!--负责人电话-->
  64. <ws-form-item label="负责人电话" span="1" prop="personPhone">
  65. <ws-input
  66. v-model="deptBudgetList.personPhone"
  67. placeholder="请输入负责人手机号码"
  68. maxlength="100"
  69. size="small"
  70. />
  71. </ws-form-item>
  72. <!--仓库所在地-->
  73. <ws-form-item label="仓库所在地" span="1" prop="acceptanceMethod">
  74. <el-cascader
  75. :options="options_"
  76. v-model="selectedOptions"
  77. clearable
  78. size="large"
  79. placeholder="请选择仓库所在地"
  80. style="width: 200%"
  81. @change="handleChange"
  82. />
  83. </ws-form-item>
  84. <!--详细地址-->
  85. <ws-form-item
  86. label="详细地址"
  87. span="1"
  88. prop="detailedAddress"
  89. class="readonly"
  90. >
  91. <ws-input
  92. v-model="deptBudgetList.detailedAddress"
  93. placeholder="请输入详细地址"
  94. maxlength="100"
  95. size="small"
  96. />
  97. </ws-form-item>
  98. <!--总吨量(吨)-->
  99. <ws-form-item
  100. label="总吨量(吨)"
  101. span="1"
  102. prop="settlementMethod"
  103. v-show="radio == 1"
  104. >
  105. <ws-input
  106. class="totalStorage"
  107. :readonly="true"
  108. v-model="totalStorage"
  109. maxlength="100"
  110. size="small"
  111. />
  112. </ws-form-item>
  113. <div
  114. style="width: 100%"
  115. class="flex position"
  116. v-for="(item, index) in freightspace"
  117. v-show="radio == 1"
  118. >
  119. <ws-form-item
  120. label="仓位编号"
  121. span="1"
  122. prop="contractNo"
  123. class="readonly"
  124. >
  125. <ws-input
  126. v-model="item.binNumber"
  127. placeholder="请输入仓位编号"
  128. maxlength="20"
  129. size="small"
  130. />
  131. </ws-form-item>
  132. <ws-form-item label="仓位储量(吨)" span="1" prop="contractNo">
  133. <ws-input
  134. v-model="item.maxStorage"
  135. placeholder="请输入仓位最大容量"
  136. maxlength="100"
  137. size="small"
  138. />
  139. </ws-form-item>
  140. <!--备注(选项)-->
  141. <ws-form-item label="备注(选填)" span="1" prop="placeDelivery">
  142. <ws-input
  143. v-model="item.remark"
  144. placeholder="请输入备注"
  145. maxlength="20"
  146. size="small"
  147. />
  148. </ws-form-item>
  149. <img
  150. width="22"
  151. height="22"
  152. class="add"
  153. @click="add"
  154. src="../../../public/img/add.png"
  155. alt=""
  156. />
  157. <img
  158. width="22"
  159. height="22"
  160. class="del"
  161. @click="del(index)"
  162. src="../../../public/img/del.png"
  163. alt=""
  164. />
  165. </div>
  166. </ws-info-table>
  167. </ws-form>
  168. <ws-form ref="deptBudgetList" :model="deptBudgetList">
  169. <div class="small-title" v-show="radio == 1">上传仓库照片</div>
  170. <ws-upload
  171. v-show="radio == 1"
  172. ref="upload"
  173. table-name="maintain_work_order"
  174. oss-key="mainPlan"
  175. :comp-id="compId"
  176. :appendix-ids="appendixIdsAdd"
  177. :vesselId="deptBudgetList.addressUrl"
  178. :size-limit="size"
  179. @uploadSuccess="uploadSuccess"
  180. @onChange="onChange"
  181. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
  182. />
  183. <div style="margin-bottom: 5px" class="small-title">仓库定位</div>
  184. <map-drag @marker="marker" @selectedAddress="selectedAddress"></map-drag>
  185. </ws-form>
  186. <!-- 提交 -->
  187. <div style="text-align: right; padding: 10px" class="center">
  188. <el-button
  189. class="bg-bottom"
  190. type="primary"
  191. size="small"
  192. @click="submit(deptBudgetList)"
  193. >提交</el-button
  194. >
  195. </div>
  196. </div>
  197. </template>
  198. <script>
  199. // import { getVesselOne } from '@/model/procurement/basic'
  200. // import { dayjs } from 'base-core-lib'
  201. import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
  202. import {
  203. addList,
  204. addxiala,
  205. editxiala,
  206. delxiala,
  207. increase,
  208. getstaff,
  209. } from '@/model/warehouse/index'
  210. import WsUpload from '@/components/WsUpload'
  211. import mapDrag from '@/components/mapdrag/mapdrag'
  212. export default {
  213. name: 'viewSpareMoney',
  214. components: {
  215. WsUpload,
  216. mapDrag,
  217. },
  218. watch: {
  219. vesselId(val) {
  220. this.getVesselData()
  221. },
  222. isShow(val) {
  223. this.showType = val
  224. },
  225. },
  226. data() {
  227. let self = this
  228. return {
  229. staffList: [],
  230. deptBudgetList: {
  231. totalStorage: 0,
  232. },
  233. options_: regionData,
  234. heightData: '600px',
  235. zoom: 7,
  236. selectedOptions: [],
  237. center: [116.244694, 39.517344],
  238. window: '',
  239. radio: 1,
  240. personCharge:[],
  241. polygons: [
  242. {
  243. pName: 'Geolocation', //定位
  244. events: {
  245. init(o) {
  246. // o 是高德地图定位插件实例
  247. o.getCurrentPosition((status, result) => {
  248. if (result && result.position) {
  249. self.lng = result.position.lng //设置经度
  250. self.lat = result.position.lat //设置维度
  251. self.center = [self.lng, self.lat] //设置坐标
  252. self.loaded = true //load
  253. self.$nextTick() //页面渲染好后
  254. }
  255. })
  256. },
  257. },
  258. },
  259. ],
  260. district: null,
  261. listDate: { country: '中国', level: 'country', city: '' },
  262. citylist: [],
  263. compId: sessionStorage.getItem('ws-pf_compId'),
  264. rules: {
  265. warehouseName: [
  266. {
  267. required: true,
  268. message: '请输入仓库名称',
  269. trigger: 'blur',
  270. },
  271. {
  272. min: 2,
  273. max: 20,
  274. message: '仓库名长度不符合要求,请输入2-20字符之内',
  275. trigger: 'blur',
  276. },
  277. ],
  278. },
  279. appendixIdsAdd: '',
  280. size: 10,
  281. value1: '',
  282. unitList: [],
  283. freightspace: [{ binNumber: '', maxStorage: '', remark: '' }],
  284. name: '',
  285. list: [],
  286. }
  287. },
  288. mounted(){
  289. this.getList()
  290. },
  291. computed: {
  292. totalStorage: function () {
  293. var maxStorage = 0
  294. for (var i = 0; i < this.freightspace.length; i++) {
  295. maxStorage += Number(this.freightspace[i].maxStorage)
  296. }
  297. return maxStorage
  298. },
  299. },
  300. methods: {
  301. dataFilter(val) {
  302. this.deptBudgetList.personCharge = val
  303. if (val) {
  304. console.log(val)
  305. this.options = this.staffList.filter((item) => {
  306. if (
  307. !!~item.staffName.indexOf(val) ||
  308. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  309. ) {
  310. return true
  311. }
  312. })
  313. } else {
  314. this.options = this.staffList
  315. }
  316. },
  317. selectstaff(e) {
  318. for (var i = 0; i < this.staffList.length; i++) {
  319. if (this.staffList[i].staffName == e) {
  320. this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
  321. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  322. }
  323. }
  324. },
  325. marker: function (item) {
  326. this.deptBudgetList.warehousePositioning =
  327. item.lnglat.lat + ',' + item.lnglat.lng
  328. },
  329. selectedAddress(e) {
  330. this.deptBudgetList.warehousePositioning =
  331. e.center.lat + ',' + e.center.lng
  332. },
  333. confirmPositioncity() {
  334. this.listDate.level = 'city'
  335. this.listDate.country = this.name
  336. },
  337. // 关闭 dialog时 处理文件url 初始化upload组件
  338. handleClose() {
  339. this.dialogViewSpareMoney = false
  340. },
  341. add() {
  342. this.freightspace.push({
  343. binNumber: '',
  344. maxStorage: '',
  345. remark: '',
  346. })
  347. },
  348. del(index) {
  349. if (this.freightspace.length > 1) {
  350. this.freightspace.splice(index, 1)
  351. }
  352. },
  353. handleChange(value) {
  354. this.selectedOptions = value
  355. },
  356. returnsales() {
  357. this.deptBudgetList = {}
  358. this.freightspace = {}
  359. this.selectedOptions = ''
  360. this.$router.push({ path: 'warehouseManagementList' })
  361. },
  362. // confirmPosition() {
  363. // this.draggable = false
  364. // },
  365. // 上传附件
  366. uploadSuccess(data, files, url) {
  367. console.log(data, files, url)
  368. // this.deptBudgetList.
  369. // this.formData.append('files', files)
  370. // this.feedbackObj.uploadNameAttachment = data.appendixName
  371. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  372. // // this.newAppendixs = files
  373. // this.onChangeFlag = true
  374. },
  375. onChange(files) {
  376. this.fileNum = files
  377. this.$refs.upload.handleSaveBill().then((res) => {})
  378. },
  379. submit() {
  380. if (this.radio == 1) {
  381. if (!this.deptBudgetList.warehouseName) {
  382. this.$message({
  383. message: '仓库名称不能为空!',
  384. type: 'warning',
  385. })
  386. return
  387. }
  388. if (
  389. this.deptBudgetList.warehouseName.length < 2 ||
  390. this.deptBudgetList.warehouseName.length > 20
  391. ) {
  392. this.$message({
  393. message: '仓库名长度不符合要求!',
  394. type: 'warning',
  395. })
  396. return
  397. }
  398. if (!this.deptBudgetList.personCharge) {
  399. this.$message({
  400. message: '负责人不能为空!',
  401. type: 'warning',
  402. })
  403. return
  404. }
  405. if (
  406. this.deptBudgetList.personCharge.length < 2 ||
  407. this.deptBudgetList.personCharge.length > 10
  408. ) {
  409. this.$message({
  410. message: '负责人长度不符合要求,请控制在2-10字符之内',
  411. type: 'warning',
  412. })
  413. return
  414. }
  415. if (!this.deptBudgetList.personPhone) {
  416. this.$message({
  417. message: '负责人电话不能为空!',
  418. type: 'warning',
  419. })
  420. return
  421. }
  422. if (this.deptBudgetList.personPhone.length != 11) {
  423. this.$message({
  424. message: '手机号输入有误!',
  425. type: 'warning',
  426. })
  427. return
  428. }
  429. // if(!this.deptBudgetList.warehousePrivate){
  430. // this.$message({
  431. // message: '仓库所在地不能为空!',
  432. // type: 'warning',
  433. // })
  434. // return
  435. // }
  436. if (!this.deptBudgetList.detailedAddress) {
  437. this.$message({
  438. message: '详细地址不能为空!',
  439. type: 'warning',
  440. })
  441. return
  442. }
  443. if (this.totalStorage <= 0) {
  444. this.$message({
  445. message: '仓位储量不能为空!',
  446. type: 'warning',
  447. })
  448. return
  449. }
  450. if (
  451. this.deptBudgetList.detailedAddress.length < 2 ||
  452. this.deptBudgetList.detailedAddress.length > 20
  453. ) {
  454. this.$message({
  455. message: '详细地址长度不符合要求,请控制在2-20字符之内',
  456. type: 'warning',
  457. })
  458. return
  459. }
  460. // freightspace
  461. for (var i = 0; i < this.freightspace.length; i++) {
  462. for (var j = i + 1; j < this.freightspace.length; j++) {
  463. console.log(
  464. this.freightspace[i].binNumber,
  465. this.freightspace[j].binNumber
  466. )
  467. if (
  468. this.freightspace[i].binNumber == this.freightspace[j].binNumber
  469. ) {
  470. this.$message({
  471. message: '仓位编号重复',
  472. type: 'warning',
  473. })
  474. return
  475. }
  476. }
  477. }
  478. this.$confirm(`确定提交仓库信息?`, {
  479. confirmButtonText: '确定',
  480. cancelButtonText: '取消',
  481. type: 'warning',
  482. })
  483. .then(() => {
  484. this.$refs.deptBudgetList.validate((valid) => {
  485. if (valid) {
  486. this.deptBudgetList.compId =
  487. sessionStorage.getItem('ws-pf_compId')
  488. this.deptBudgetList.warehousePrivate =
  489. CodeToText[this.selectedOptions[0]]
  490. this.deptBudgetList.warehouseCity =
  491. CodeToText[this.selectedOptions[1]]
  492. this.deptBudgetList.warehouseArea =
  493. CodeToText[this.selectedOptions[2]]
  494. this.deptBudgetList.warehousePositionInfoList =
  495. this.freightspace
  496. this.deptBudgetList.totalStorage = this.totalStorage
  497. addList(this.deptBudgetList)
  498. .toPromise()
  499. .then((response) => {
  500. this.$message.success('添加成功')
  501. this.deptBudgetList = {}
  502. this.freightspace = {}
  503. this.selectedOptions = ''
  504. this.$router.push({ path: 'warehouseManagementList' })
  505. })
  506. } else {
  507. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  508. return false
  509. }
  510. })
  511. })
  512. .catch(() => {
  513. return false
  514. })
  515. } else if (this.radio == 2) {
  516. if (!this.deptBudgetList.warehouseName) {
  517. this.$message({
  518. message: '仓库名称不能为空!',
  519. type: 'warning',
  520. })
  521. return
  522. }
  523. if (
  524. this.deptBudgetList.warehouseName.length < 2 ||
  525. this.deptBudgetList.warehouseName.length > 20
  526. ) {
  527. this.$message({
  528. message: '仓库名长度不符合要求!',
  529. type: 'warning',
  530. })
  531. return
  532. }
  533. if (!this.deptBudgetList.personCharge) {
  534. this.$message({
  535. message: '负责人不能为空!',
  536. type: 'warning',
  537. })
  538. return
  539. }
  540. if (
  541. this.deptBudgetList.personCharge.length < 2 ||
  542. this.deptBudgetList.personCharge.length > 10
  543. ) {
  544. this.$message({
  545. message: '负责人长度不符合要求,请控制在2-10字符之内',
  546. type: 'warning',
  547. })
  548. return
  549. }
  550. if (!this.deptBudgetList.personPhone) {
  551. this.$message({
  552. message: '负责人电话不能为空!',
  553. type: 'warning',
  554. })
  555. return
  556. }
  557. if (this.deptBudgetList.personPhone.length != 11) {
  558. this.$message({
  559. message: '手机号输入有误!',
  560. type: 'warning',
  561. })
  562. return
  563. }
  564. // if(!this.deptBudgetList.warehousePrivate){
  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. this.$confirm(`确定提交仓库信息?`, {
  579. confirmButtonText: '确定',
  580. cancelButtonText: '取消',
  581. type: 'warning',
  582. })
  583. .then(() => {
  584. this.$refs.deptBudgetList.validate((valid) => {
  585. if (valid) {
  586. this.deptBudgetList.compId =
  587. sessionStorage.getItem('ws-pf_compId')
  588. this.deptBudgetList.warehousePrivate =
  589. CodeToText[this.selectedOptions[0]]
  590. this.deptBudgetList.warehouseCity =
  591. CodeToText[this.selectedOptions[1]]
  592. this.deptBudgetList.warehouseArea =
  593. CodeToText[this.selectedOptions[2]]
  594. this.deptBudgetList.warehousePositionInfoList =
  595. this.freightspace
  596. this.deptBudgetList.totalStorage = this.totalStorage
  597. increase(this.deptBudgetList)
  598. .toPromise()
  599. .then((response) => {
  600. this.$message.success('添加成功')
  601. this.deptBudgetList = {}
  602. this.freightspace = {}
  603. this.selectedOptions = ''
  604. this.$router.push({ path: 'warehouseManagementList' })
  605. })
  606. } else {
  607. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  608. return false
  609. }
  610. })
  611. })
  612. .catch(() => {
  613. return false
  614. })
  615. }
  616. },
  617. resetForm(deptBudgetList) {
  618. this.$refs[deptBudgetList].resetFields()
  619. },
  620. saveClick(item, index) {
  621. console.log(item)
  622. if (Object.is(item.id, 1)) {
  623. return
  624. }
  625. if (Object.is(this.unitList[index].flag, 'delete')) {
  626. this.$set(this.unitList, index, { flag: 'check' })
  627. } else {
  628. this.$set(this.unitList, index, { flag: 'delete' })
  629. }
  630. if (!item.constValue) {
  631. this.unitList.splice(index, 1)
  632. return
  633. }
  634. if (item.flag == 'add') {
  635. item.constKey = Math.random() * 20
  636. this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
  637. this.trainingMethods.constKey = item.constKey
  638. this.trainingMethods.constCode = 'TYPEYAN'
  639. this.trainingMethods.constValue = item.constValue
  640. this.trainingMethods.id = item.id
  641. addxiala(this.trainingMethods)
  642. .toPromise()
  643. .then((response) => {
  644. this.getUnitList()
  645. })
  646. } else if (item.flag == 'check') {
  647. this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
  648. this.trainingMethods.constKey = item.constKey
  649. this.trainingMethods.constCode = 'TYPEYAN'
  650. this.trainingMethods.constValue = item.constValue
  651. this.trainingMethods.id = item.id
  652. editxiala(this.trainingMethods)
  653. .toPromise()
  654. .then((response) => {
  655. this.getUnitList()
  656. })
  657. }
  658. },
  659. // selectContract(val) {
  660. // let key = this.unitList.find((item) => item.constValue === val).constKey
  661. // this.pleaseChoose = val
  662. // },
  663. getList(){
  664.  getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
  665.         .toPromise()
  666.         .then((response) => {
  667.           // this.agent = response
  668. //           this.options = response
  669. //            this.staffList = response
  670. this.personCharge = response
  671.         })
  672. },
  673. handleExamine() {},
  674. approve() {},
  675. // returnsales() {
  676. // this.$router.push({ path: 'purchaseContract' })
  677. // },
  678. selectChapterTwo(e) {
  679. for (var i = 0; i < this.ChapterTwoList.length; i++) {
  680. if (this.ChapterTwoList[i].constValue == e) {
  681. this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
  682. }
  683. }
  684. },
  685. selectunitList(e) {
  686. for (var i = 0; i < this.unitList.length; i++) {
  687. if (this.unitList[i].constValue == e) {
  688. this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
  689. }
  690. }
  691. },
  692. selectgrade(e) {
  693. for (var i = 0; i < this.gradeList.length; i++) {
  694. if (this.gradeList[i].constValue == e) {
  695. this.deptBudgetList.gradeKey = this.gradeList[i].constKey
  696. }
  697. }
  698. },
  699. selectgoodsName(e) {
  700. for (var i = 0; i < this.goodnameList.length; i++) {
  701. if (this.goodnameList[i].constValue == e) {
  702. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  703. }
  704. }
  705. },
  706. selectpackingMethod(e) {
  707. for (var i = 0; i < this.packtypeList.length; i++) {
  708. if (this.packtypeList[i].constValue == e) {
  709. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  710. }
  711. }
  712. },
  713. // 编辑
  714. editClick(item, index) {
  715. const map = JSON.parse(JSON.stringify(item))
  716. if (Object.is(item.id, 1)) {
  717. return
  718. }
  719. if (Object.is(this.unitList[index].flag, 'delete')) {
  720. map.flag = 'check'
  721. this.$set(this.unitList, index, map)
  722. } else {
  723. map.flag = 'delete'
  724. this.$set(this.unitList, index, map)
  725. }
  726. },
  727. // 删除
  728. deleteClick(item, index) {
  729. if (Object.is(item.constKey, 1)) {
  730. return
  731. }
  732. if (!item.constValue) {
  733. this.unitList.splice(index, 1)
  734. return
  735. }
  736. delxiala({ id: this.unitList[index].id })
  737. .toPromise()
  738. .then((response) => {
  739. this.getUnitList()
  740. this.pleaseChoose = ''
  741. })
  742. },
  743. },
  744. }
  745. </script>
  746. <style lang="scss" scoped>
  747. /deep/.totalStorage .el-input__inner {
  748. color: #afb5cb;
  749. background: #f5f7fa;
  750. }
  751. .small-title {
  752. position: relative;
  753. padding: 10px;
  754. font-weight: 600;
  755. }
  756. .small-title::before {
  757. position: absolute;
  758. content: '';
  759. display: block;
  760. background: #5473e8;
  761. width: 4px;
  762. height: 14px;
  763. left: 0px;
  764. top: 13px;
  765. }
  766. .position {
  767. position: relative;
  768. }
  769. .add,
  770. .del {
  771. position: absolute;
  772. right: -38px;
  773. top: 9px;
  774. cursor: pointer;
  775. }
  776. .del {
  777. right: -70px;
  778. }
  779. .amap-page-container {
  780. width: 300px;
  781. height: 300px;
  782. }
  783. .el-form {
  784. padding: 0 15%;
  785. }
  786. /deep/.ws-info-table .el-form-item {
  787. border-right: 1px solid transparent;
  788. border-bottom: 1px solid transparent;
  789. }
  790. .readonly {
  791. position: relative;
  792. }
  793. .readonly:after {
  794. content: '*';
  795. color: #ff2727;
  796. position: absolute;
  797. right: 8px;
  798. z-index: 10;
  799. top: 21%;
  800. font-size: 20px;
  801. }
  802. .title {
  803. position: relative;
  804. }
  805. .title::before {
  806. content: '';
  807. display: inline-block;
  808. width: 5px;
  809. height: 30px;
  810. background: #5473e8;
  811. position: absolute;
  812. left: 0;
  813. }
  814. .ws-info-table {
  815. border-left: 1px solid transparent;
  816. border-top: 1px solid transparent;
  817. }
  818. .el-button--primary {
  819. background-color: #5878e8;
  820. border-color: #5878e8;
  821. }
  822. .el-col {
  823. background: #f6f7fc;
  824. }
  825. /deep/.ws-info-table .el-form-item .el-form-item__content {
  826. padding: 0 25px;
  827. border-left: 1px solid transparent;
  828. background: #fff;
  829. }
  830. /deep/.ws-info-table .el-form-item .el-form-item__label {
  831. width: 100px;
  832. text-align: center;
  833. background: #fff;
  834. // border: 1px solid #cdd2dc;
  835. }
  836. .button-container {
  837. display: flex;
  838. flex-wrap: nowrap;
  839. justify-content: space-between;
  840. align-items: center;
  841. background-color: #fff;
  842. width: 100%;
  843. height: 50px;
  844. padding: 0 10px;
  845. & > div {
  846. margin-left: 10px;
  847. display: flex;
  848. flex-wrap: nowrap;
  849. flex-direction: row;
  850. & > span {
  851. line-height: 50px;
  852. }
  853. }
  854. /deep/.auditFlow-box {
  855. position: unset;
  856. margin-left: 10px;
  857. &/deep/.auditFlow-icon {
  858. width: auto;
  859. padding-right: 30px;
  860. }
  861. &/deep/.auditFlow-main {
  862. position: absolute;
  863. }
  864. }
  865. }
  866. .box-app {
  867. display: inline-block;
  868. float: left;
  869. margin-left: 30px;
  870. line-height: 50px;
  871. }
  872. /deep/.el-dialog {
  873. .el-form-item {
  874. margin-bottom: 0 !important;
  875. .el-input--medium {
  876. textarea {
  877. min-height: 100px !important;
  878. }
  879. }
  880. }
  881. }
  882. .collapse-bottom {
  883. margin-bottom: 20px;
  884. }
  885. .input-main .textarea .el-textarea__inner {
  886. width: 100%;
  887. z-index: 1;
  888. }
  889. .bg-left {
  890. padding-left: 30px;
  891. }
  892. .bg-right {
  893. padding-right: 10px;
  894. text-align: right;
  895. }
  896. .bg-bottom {
  897. margin: 15px 0px;
  898. }
  899. .wenzi {
  900. width: 900px;
  901. margin: 0 auto;
  902. }
  903. .wenzi h3 {
  904. display: inline-block;
  905. left: 10px;
  906. }
  907. .wenzi p {
  908. display: inline-block;
  909. }
  910. .center {
  911. width: 900px;
  912. margin: 0 auto;
  913. }
  914. .el-form-item {
  915. width: 50%;
  916. }
  917. .el-form-item__label {
  918. text-align: center;
  919. }
  920. .ce {
  921. width: 900px;
  922. margin: 0 auto;
  923. }
  924. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  925. /* height: 82px;*/
  926. /*}*/
  927. // 控制select为只读的时候显示样式
  928. .hide-sel {
  929. .el-input__inner {
  930. border: 0px;
  931. }
  932. .el-icon-arrow-up {
  933. display: none;
  934. }
  935. .el-textarea__inner {
  936. background-color: #fff !important;
  937. border: 0;
  938. }
  939. .el-date-editor {
  940. i {
  941. display: none;
  942. }
  943. }
  944. .is-disabled {
  945. .el-input__inner:hover {
  946. background-color: #fff !important;
  947. border: 0;
  948. }
  949. color: #606266;
  950. .el-input__inner {
  951. background-color: #fff !important;
  952. border: 0;
  953. color: #606266;
  954. }
  955. .el-textarea__inner {
  956. background-color: #fff !important;
  957. border: 0;
  958. color: #606266;
  959. }
  960. }
  961. }
  962. // 控制select为只读的时候显示样式
  963. /deep/.ws-class-table-col {
  964. height: auto;
  965. padding: 0px 2px;
  966. /deep/.el-input__inner {
  967. padding: 0px 2px;
  968. }
  969. }
  970. /deep/.is-disabled {
  971. .el-input__prefix,
  972. .el-input__suffix {
  973. display: none;
  974. }
  975. .el-input__inner {
  976. background-color: #fff;
  977. border-color: #fff !important;
  978. color: #000 !important;
  979. font-size: 14px;
  980. cursor: text;
  981. padding: 0 !important;
  982. }
  983. }
  984. .winseaview-view {
  985. padding: 0 0 20px;
  986. }
  987. .container {
  988. overflow: scroll;
  989. height: 93vh;
  990. }
  991. .ws-info-table .el-form-item {
  992. width: 33.3333%;
  993. }
  994. .readonly:after {
  995. display: none;
  996. }
  997. .el-textarea__inner {
  998. display: none;
  999. }
  1000. .el-form {
  1001. margin-top: 50px;
  1002. }
  1003. .readonly {
  1004. width: 16%;
  1005. }
  1006. .ws-info-table .el-form-item {
  1007. width: 33.33%;
  1008. }
  1009. //去边框
  1010. /deep/.el-form-item {
  1011. border-right: 0px;
  1012. border-bottom: 0px;
  1013. }
  1014. /deep/.ws-info-table {
  1015. border-left: 0px;
  1016. border-top: 0px;
  1017. }
  1018. .ws-info-table .el-form-item .el-form-item__content {
  1019. border-right: 0px;
  1020. border-bottom: 0px;
  1021. border-left: 0px;
  1022. border-top: 0px;
  1023. }
  1024. /deep/.ws-info-table .el-form-item {
  1025. border-right: 0px;
  1026. border-bottom: 0px;
  1027. border-left: 0px;
  1028. border-top: 0px;
  1029. }
  1030. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1031. background: #f5f7fa;
  1032. border-radius: 4px;
  1033. border: 1px solid #d8dce6;
  1034. font-family: PingFangSC-Regular, PingFang SC;
  1035. margin-bottom: 5px;
  1036. background-color: #fff;
  1037. font-size: 14px;
  1038. font-weight: 400;
  1039. color: #8890b1;
  1040. line-height: 16px;
  1041. }
  1042. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1043. background-color: #fff;
  1044. font-size: 14px;
  1045. font-family: PingFangSC-Regular, PingFang SC;
  1046. font-weight: 400;
  1047. color: #8890b1;
  1048. line-height: 16px;
  1049. }
  1050. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1051. border: 0px;
  1052. }
  1053. //地图
  1054. // .position{
  1055. // margin: 0 auto;
  1056. // }
  1057. </style>