warehouseManagementAdd.vue 27 KB

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