warehouseManagementAdd.vue 28 KB

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