purchaseContractAdd.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. <!--销售合同-->
  2. <!--2019年5月30日 20:25:16 by jlx-->
  3. <template>
  4. <div class="container">
  5. <el-row>
  6. <el-col :span="12">
  7. <h2 class="bg-left">创建销售合同</h2>
  8. </el-col>
  9. <el-col :span="12" class="bg-right">
  10. <el-button
  11. class="bg-bottom"
  12. type="primary"
  13. size="small"
  14. @click="returnsales()"
  15. >返回</el-button
  16. >
  17. </el-col>
  18. </el-row>
  19. <ws-form
  20. ref="deptBudgetList"
  21. :rules="mainReportAdd"
  22. :model="deptBudgetList"
  23. >
  24. <div class="remark">
  25. <h3>基本信息</h3>
  26. <p>注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。</p>
  27. </div>
  28. <ws-info-table>
  29. <ws-form-item label="合同编号" span="1" prop="contractNo">
  30. <ws-input
  31. v-model="deptBudgetList.contractNo"
  32. maxlength="100"
  33. size="small"
  34. />
  35. <span class="unchangeable">*</span>
  36. </ws-form-item>
  37. <ws-form-item label="运输方式" span="1" prop="shippingType">
  38. <ws-input
  39. v-model="deptBudgetList.shippingType"
  40. maxlength="100"
  41. size="small"
  42. />
  43. </ws-form-item>
  44. <ws-form-item label="买方" span="1" prop="buyer">
  45. <ws-input
  46. v-model="deptBudgetList.buyer"
  47. maxlength="100"
  48. size="small"
  49. />
  50. </ws-form-item>
  51. <ws-form-item label="结算方式" span="1" prop="settlementMethod">
  52. <ws-input
  53. v-model="deptBudgetList.settlementMethod"
  54. maxlength="100"
  55. size="small"
  56. />
  57. </ws-form-item>
  58. <ws-form-item label="卖方" span="1" prop="seller">
  59. <ws-input
  60. v-model="deptBudgetList.seller"
  61. maxlength="100"
  62. size="small"
  63. />
  64. </ws-form-item>
  65. <ws-form-item label="货源地" span="1" prop="sourceGoods">
  66. <ws-input
  67. v-model="deptBudgetList.sourceGoods"
  68. maxlength="100"
  69. size="small"
  70. />
  71. </ws-form-item>
  72. <ws-form-item label="买方电话" span="1" prop="buyerPhone">
  73. <ws-input
  74. v-model="deptBudgetList.buyerPhone"
  75. maxlength="100"
  76. size="small"
  77. />
  78. </ws-form-item>
  79. <ws-form-item label="交货地" span="1" prop="placeDelivery">
  80. <ws-input
  81. v-model="deptBudgetList.placeDelivery"
  82. maxlength="100"
  83. size="small"
  84. />
  85. </ws-form-item>
  86. <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
  87. <ws-input
  88. v-model="deptBudgetList.sellerPhone"
  89. maxlength="100"
  90. size="small"
  91. />
  92. </ws-form-item>
  93. <ws-form-item label="包装方式" span="1" prop="packingMethod">
  94. <ws-select
  95. v-model="deptBudgetList.packingMethod"
  96. placeholder=""
  97. class="typeselect"
  98. @change="selectpackingMethod"
  99. >
  100. <ws-option
  101. v-for="item in packtypeList"
  102. :key="item.constKey"
  103. :label="item.constValue"
  104. :value="item.constValue"
  105. />
  106. </ws-select>
  107. </ws-form-item>
  108. <ws-form-item label="重量(吨)" span="1" prop="weight">
  109. <ws-input
  110. v-model="deptBudgetList.weight"
  111. maxlength="100"
  112. size="small"
  113. />
  114. </ws-form-item>
  115. <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
  116. <el-select
  117. v-model="deptBudgetList.acceptanceMethod"
  118. placeholder="请选择验收方式"
  119. style="width: 100%"
  120. filterable
  121. @change="selectunitList"
  122. >
  123. <el-option
  124. v-for="(item, index) in unitList"
  125. :key="item.constValue"
  126. :label="item.constValue"
  127. :value="item.constValue"
  128. >
  129. <span class="unit-left" style="float: left">
  130. <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
  131. <!-- 新增文本框 -->
  132. <div
  133. style="width: 160px"
  134. v-if="item.flag !== 'delete'"
  135. @click.stop
  136. >
  137. <ws-input
  138. v-model="item.constValue"
  139. clearable
  140. maxlength="10"
  141. style="width: 100%"
  142. ></ws-input>
  143. </div>
  144. </span>
  145. <span style="float: right; color: #8492a6; font-size: 13px">
  146. <!-- 对号 -->
  147. <i
  148. class="el-icon-check"
  149. style="line-height: 29px; margin-left: 10px"
  150. v-if="item.flag !== 'delete'"
  151. @click.stop="saveClick(item, index)"
  152. ></i>
  153. <!-- 编辑 -->
  154. <i
  155. class="el-icon-edit"
  156. style="line-height: 29px; margin-left: 10px"
  157. v-if="item.flag == 'delete'"
  158. @click.stop="editClick(item, index)"
  159. ></i>
  160. <!-- 删除 -->
  161. <i
  162. class="el-icon-delete"
  163. style="line-height: 29px"
  164. @click.stop="deleteClick(item, index)"
  165. ></i>
  166. </span>
  167. </el-option>
  168. <!-- 新增按钮 -->
  169. <el-option value="" label="">
  170. <div style="text-align: center">
  171. <ws-button type="primary" @click.stop="addClick">{{
  172. $t('button.add')
  173. }}</ws-button>
  174. </div>
  175. </el-option>
  176. </el-select>
  177. </ws-form-item>
  178. <ws-form-item label="溢短装(%)" span="1" prop="overShort">
  179. <ws-input
  180. v-model="deptBudgetList.overShort"
  181. maxlength="100"
  182. size="small"
  183. />
  184. </ws-form-item>
  185. <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
  186. <ws-date-picker
  187. :picker-options="pickerBeginDateBefore"
  188. v-model="deptBudgetList.deliveryDateStart"
  189. type="date"
  190. default-value="1980-01-01"
  191. placeholder="交货日期(起)"
  192. format="yyyy-MM-dd"
  193. value-format="yyyy-MM-dd"
  194. />
  195. </ws-form-item>
  196. <ws-form-item
  197. label="合同单价(元/吨)"
  198. span="1"
  199. prop="unitContractPrice"
  200. >
  201. <ws-input
  202. v-model="deptBudgetList.unitContractPrice"
  203. maxlength="100"
  204. size="small"
  205. />
  206. </ws-form-item>
  207. <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
  208. <ws-date-picker
  209. :picker-options="pickerBeginDateBefore"
  210. v-model="deptBudgetList.deliveryDateEnd"
  211. type="date"
  212. default-value="1980-01-01"
  213. placeholder="交货日期(止)"
  214. format="yyyy-MM-dd"
  215. value-format="yyyy-MM-dd"
  216. />
  217. </ws-form-item>
  218. <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
  219. <ws-input
  220. v-model="deptBudgetList.totalContractPrice"
  221. maxlength="100"
  222. size="small"
  223. />
  224. </ws-form-item>
  225. <ws-form-item label="签订日期" span="1" prop="signingDate">
  226. <ws-date-picker
  227. :picker-options="pickerBeginDateBefore"
  228. v-model="deptBudgetList.signingDate"
  229. type="date"
  230. default-value="1980-01-01"
  231. placeholder="签订日期"
  232. format="yyyy-MM-dd"
  233. value-format="yyyy-MM-dd"
  234. />
  235. </ws-form-item>
  236. </ws-info-table>
  237. <base-card>
  238. <!--面试信息-->
  239. <div class="remark">
  240. <h3>货物信息</h3>
  241. </div>
  242. <ws-info-table>
  243. <ws-form-item label="货名" span="1" prop="goodsName">
  244. <ws-select
  245. v-model="deptBudgetList.contractGoodsInfo.goodsName"
  246. placeholder=""
  247. class="typeselect"
  248. @change="selectgoodsName"
  249. >
  250. <ws-option
  251. v-for="item in goodnameList"
  252. :key="item.constKey"
  253. :label="item.constValue"
  254. :value="item.constValue"
  255. />
  256. </ws-select>
  257. </ws-form-item>
  258. <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
  259. <ws-input
  260. v-model="deptBudgetList.contractGoodsInfo.waterContent"
  261. maxlength="100"
  262. size="small"
  263. />
  264. </ws-form-item>
  265. <ws-form-item label="品级" span="1" prop="grade">
  266. <ws-select
  267. v-model="deptBudgetList.contractGoodsInfo.grade"
  268. placeholder=""
  269. class="typeselect"
  270. @change="selectgrade"
  271. >
  272. <ws-option
  273. v-for="item in gradeList"
  274. :key="item.constValue"
  275. :label="item.constValue"
  276. :value="item.constValue"
  277. />
  278. </ws-select>
  279. </ws-form-item>
  280. <ws-form-item label="杂质(%)<=" span="1" prop="interviewDates">
  281. <ws-input
  282. v-model="deptBudgetList.contractGoodsInfo.impurity"
  283. maxlength="100"
  284. size="small"
  285. />
  286. </ws-form-item>
  287. <ws-form-item label="容重(克/升)<=" span="1" prop="interviewType">
  288. <ws-input
  289. v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
  290. maxlength="100"
  291. size="small"
  292. />
  293. </ws-form-item>
  294. <ws-form-item
  295. label="霉变粒(%)<="
  296. span="1"
  297. prop="mildewGrain"
  298. class="result"
  299. >
  300. <ws-input
  301. v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
  302. maxlength="100"
  303. size="small"
  304. />
  305. </ws-form-item>
  306. <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
  307. <ws-input
  308. v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
  309. maxlength="100"
  310. size="small"
  311. />
  312. </ws-form-item>
  313. <ws-form-item
  314. label="不完善粒(%)<="
  315. span="1"
  316. prop="imperfectGrain"
  317. class="result"
  318. >
  319. <ws-input
  320. v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
  321. maxlength="100"
  322. size="small"
  323. />
  324. </ws-form-item>
  325. </ws-info-table>
  326. <div class="remark">
  327. <h3>流程信息</h3>
  328. </div>
  329. <ws-info-table>
  330. <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
  331. <ws-input
  332. v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
  333. maxlength="100"
  334. size="small"
  335. />
  336. </ws-form-item>
  337. <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
  338. <ws-input
  339. v-model="deptBudgetList.contractProcessInfo.goodsName"
  340. maxlength="100"
  341. size="small"
  342. />
  343. </ws-form-item>
  344. <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
  345. <ws-input
  346. v-model="deptBudgetList.contractProcessInfo.waterContent"
  347. maxlength="100"
  348. size="small"
  349. />
  350. </ws-form-item>
  351. <ws-form-item label="未开发票(元)" span="1" prop="impurity">
  352. <ws-input
  353. v-model="deptBudgetList.contractProcessInfo.impurity"
  354. maxlength="100"
  355. size="small"
  356. />
  357. </ws-form-item>
  358. <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
  359. <ws-input
  360. v-model="deptBudgetList.contractProcessInfo.mildewGrain"
  361. maxlength="100"
  362. size="small"
  363. />
  364. </ws-form-item>
  365. <ws-form-item
  366. label="已完成发运量(吨)"
  367. span="1"
  368. prop="Prettier"
  369. class="imperfectGrain"
  370. >
  371. <ws-input
  372. v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
  373. maxlength="100"
  374. size="small"
  375. />
  376. </ws-form-item>
  377. <ws-form-item label="双章原件回收情况" span="1" prop="grade">
  378. <ws-select
  379. v-model="deptBudgetList.contractProcessInfo.grade"
  380. placeholder=""
  381. class="typeselect"
  382. @change="selectChapterTwo"
  383. >
  384. <ws-option
  385. v-for="item in ChapterTwoList"
  386. :key="item.constValue"
  387. :label="item.constValue"
  388. :value="item.constValue"
  389. />
  390. </ws-select>
  391. </ws-form-item>
  392. </ws-info-table>
  393. <div class="remark">
  394. <h3>备注信息</h3>
  395. </div>
  396. <ws-input
  397. v-model="deptBudgetList.remarks"
  398. type="textarea"
  399. row="3"
  400. placeholder="请输入备注信息,不超过200字"
  401. maxlength="200"
  402. />
  403. <ws-upload
  404. ref="upload"
  405. table-name="maintain_work_order"
  406. oss-key="mainPlan"
  407. :comp-id="compId"
  408. :appendix-ids="appendixIdsAdd"
  409. :vesselId="deptBudgetList.addressUrl"
  410. :size-limit="size"
  411. @uploadSuccess="uploadSuccess"
  412. @onChange="onChange"
  413. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
  414. />
  415. </base-card>
  416. </ws-form>
  417. <div style="text-align: right; padding: 10px">
  418. <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
  419. >提交</el-button
  420. >
  421. </div>
  422. </div>
  423. </template>
  424. <script>
  425. import { EventBus, dayjs } from 'base-core-lib'
  426. import {
  427. packList,
  428. addList,
  429. xiala,
  430. addxiala,
  431. editxiala,
  432. delxiala,
  433. } from '@/model/contarct/index'
  434. import WsUpload from '@/components/WsUpload'
  435. export default {
  436. name: 'viewSpareMoney',
  437. watch: {
  438. vesselId(val) {
  439. this.getVesselData()
  440. },
  441. isShow(val) {
  442. this.showType = val
  443. },
  444. $route(to, from) {
  445. this.loaddata()
  446. },
  447. },
  448. components: {
  449. WsUpload,
  450. },
  451. data() {
  452. return {
  453. //弹出框
  454. dialogViewSpareMoney: false,
  455. dialogApproveFormVisible: false,
  456. // 船舶类型
  457. monetaryKey: null,
  458. // 表格显示数据
  459. tableDate: [],
  460. // 是否显示
  461. showType: true,
  462. // 年
  463. year: '',
  464. size: 10,
  465. pleaseChoose: '',
  466. // 提交类型
  467. submitType: true,
  468. tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
  469. ruleDeptBudget: [],
  470. deptBudgetList: {
  471. contractGoodsInfo: {
  472. goodsName: '',
  473. },
  474. contractProcessInfo: {},
  475. },
  476. appendixIdsAdd: '',
  477. mainReportAdd: {},
  478. trainingMethods: {},
  479. pickerBeginDateBefore: {
  480. disabledDate: (time) => {
  481. return time.getTime() > Date.now()
  482. },
  483. },
  484. compId: sessionStorage.getItem('ws-pf_compId'),
  485. packtypeList: [],
  486. goodnameList: [],
  487. ChapterTwoList: [],
  488. unitList: [],
  489. gradeList: [],
  490. taskTypeList: [
  491. { value: '未完成(默认)' },
  492. { value: '已完成' },
  493. { value: '待回款' },
  494. { value: '全部合同' },
  495. ],
  496. }
  497. },
  498. activated() {
  499. //cg.viewBudget
  500. //cg.viewSpareMoney
  501. // this.getVesselData();
  502. this.loaddata()
  503. this.showType = this.isShow
  504. },
  505. methods: {
  506. // 关闭 dialog时 处理文件url 初始化upload组件
  507. handleClose() {
  508. this.dialogViewSpareMoney = false
  509. },
  510. loaddata() {
  511. // 包装方式
  512. packList({ constId: 'CON1' })
  513. .toPromise()
  514. .then((response) => {
  515. this.packtypeList = response
  516. })
  517. // 验收方式
  518. this.getUnitList()
  519. // 货名
  520. packList({ constId: 'CON2' })
  521. .toPromise()
  522. .then((response) => {
  523. this.goodnameList = response
  524. })
  525. // 品级
  526. packList({ constId: 'CON3' })
  527. .toPromise()
  528. .then((response) => {
  529. this.gradeList = response
  530. })
  531. // 双章
  532. packList({ constId: 'CON4' })
  533. .toPromise()
  534. .then((response) => {
  535. this.ChapterTwoList = response
  536. })
  537. },
  538. // 上传附件
  539. uploadSuccess(data, files, url) {
  540. console.log(data, files, url)
  541. // this.deptBudgetList.
  542. // this.formData.append('files', files)
  543. // this.feedbackObj.uploadNameAttachment = data.appendixName
  544. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  545. // // this.newAppendixs = files
  546. // this.onChangeFlag = true
  547. },
  548. onChange(files) {
  549. this.fileNum = files
  550. this.$refs.upload.handleSaveBill().then((res) => {
  551. console.log(files)
  552. })
  553. },
  554. submit() {
  555. this.$refs.deptBudgetList.validate((valid) => {
  556. if (valid) {
  557. this.deptBudgetList.compId = this.compId
  558. this.deptBudgetList.contractType = 2
  559. addList(this.deptBudgetList)
  560. .toPromise()
  561. .then((response) => {
  562. this.$message.success('添加成功')
  563. this.$router.push({ path: 'purchaseContract' })
  564. })
  565. } else {
  566. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  567. return false
  568. }
  569. })
  570. },
  571. getUnitList() {
  572. xiala({
  573. compId: sessionStorage.getItem('ws-pf_compId'),
  574. constCode: 'TYPEYAN',
  575. })
  576. .toPromise()
  577. .then((response) => {
  578. this.unitList = response
  579. let currItem
  580. this.unitList.forEach((item, index, arr) => {
  581. item.flag = 'delete'
  582. if (this.vModel == item.constKey) {
  583. currItem = item
  584. }
  585. })
  586. //
  587. if (currItem) {
  588. this.selectContract(currItem.constValue)
  589. }
  590. })
  591. },
  592. selectContract(val) {
  593. let key = this.unitList.find((item) => item.constValue === val).constKey
  594. this.pleaseChoose = val
  595. },
  596. handleExamine() {},
  597. approve() {},
  598. returnsales() {
  599. this.$router.push({ path: 'purchaseContract' })
  600. },
  601. selectChapterTwo(e) {
  602. for (var i = 0; i < this.ChapterTwoList.length; i++) {
  603. if (this.ChapterTwoList[i].constValue == e) {
  604. this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
  605. }
  606. }
  607. },
  608. selectunitList(e) {
  609. for (var i = 0; i < this.unitList.length; i++) {
  610. if (this.unitList[i].constValue == e) {
  611. this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
  612. }
  613. }
  614. },
  615. selectgrade(e) {
  616. for (var i = 0; i < this.gradeList.length; i++) {
  617. if (this.gradeList[i].constValue == e) {
  618. this.deptBudgetList.gradeKey = this.gradeList[i].constKey
  619. }
  620. }
  621. },
  622. selectgoodsName(e) {
  623. for (var i = 0; i < this.goodnameList.length; i++) {
  624. if (this.goodnameList[i].constValue == e) {
  625. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  626. }
  627. }
  628. },
  629. selectpackingMethod(e) {
  630. for (var i = 0; i < this.packtypeList.length; i++) {
  631. if (this.packtypeList[i].constValue == e) {
  632. this.deptBudgetList.acceptanceMethodKey = this.packtypeList[
  633. i
  634. ].constKey
  635. }
  636. }
  637. },
  638. addClick() {
  639. this.unitList.push({
  640. flag: 'add',
  641. constValue: '',
  642. constKey: '',
  643. })
  644. },
  645. saveClick(item, index) {
  646. console.log(item)
  647. if (Object.is(item.id, 1)) {
  648. return
  649. }
  650. if (Object.is(this.unitList[index].flag, 'delete')) {
  651. this.$set(this.unitList, index, { flag: 'check' })
  652. } else {
  653. this.$set(this.unitList, index, { flag: 'delete' })
  654. }
  655. if (!item.constValue) {
  656. this.unitList.splice(index, 1)
  657. return
  658. }
  659. if (item.flag == 'add') {
  660. item.constKey = Math.random() * 20
  661. this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
  662. this.trainingMethods.constKey = item.constKey
  663. this.trainingMethods.constCode = 'TYPEYAN'
  664. this.trainingMethods.constValue = item.constValue
  665. this.trainingMethods.id = item.id
  666. addxiala(this.trainingMethods)
  667. .toPromise()
  668. .then((response) => {
  669. this.getUnitList()
  670. })
  671. } else if (item.flag == 'check') {
  672. this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
  673. this.trainingMethods.constKey = item.constKey
  674. this.trainingMethods.constCode = 'TYPEYAN'
  675. this.trainingMethods.constValue = item.constValue
  676. this.trainingMethods.id = item.id
  677. editxiala(this.trainingMethods)
  678. .toPromise()
  679. .then((response) => {
  680. this.getUnitList()
  681. })
  682. }
  683. },
  684. // 编辑
  685. editClick(item, index) {
  686. const map = JSON.parse(JSON.stringify(item))
  687. if (Object.is(item.id, 1)) {
  688. return
  689. }
  690. if (Object.is(this.unitList[index].flag, 'delete')) {
  691. map.flag = 'check'
  692. this.$set(this.unitList, index, map)
  693. } else {
  694. map.flag = 'delete'
  695. this.$set(this.unitList, index, map)
  696. }
  697. },
  698. // 删除
  699. deleteClick(item, index) {
  700. if (Object.is(item.constKey, 1)) {
  701. return
  702. }
  703. if (!item.constValue) {
  704. this.unitList.splice(index, 1)
  705. return
  706. }
  707. delxiala({ id: this.unitList[index].id })
  708. .toPromise()
  709. .then((response) => {
  710. this.getUnitList()
  711. this.pleaseChoose = ''
  712. })
  713. },
  714. },
  715. }
  716. </script>
  717. <style lang="scss" scoped>
  718. .ws-upload {
  719. margin-top: 20px;
  720. }
  721. .el-form {
  722. padding: 0 20%;
  723. }
  724. .el-form-item {
  725. width: 50%;
  726. }
  727. .unchangeable {
  728. color: #1d6ced;
  729. }
  730. .button-container {
  731. display: flex;
  732. flex-wrap: nowrap;
  733. justify-content: space-between;
  734. align-items: center;
  735. background-color: #fff;
  736. width: 100%;
  737. height: 50px;
  738. padding: 0 10px;
  739. & > div {
  740. margin-left: 10px;
  741. display: flex;
  742. flex-wrap: nowrap;
  743. flex-direction: row;
  744. & > span {
  745. line-height: 50px;
  746. }
  747. }
  748. /deep/.auditFlow-box {
  749. position: unset;
  750. margin-left: 10px;
  751. &/deep/.auditFlow-icon {
  752. width: auto;
  753. padding-right: 30px;
  754. }
  755. &/deep/.auditFlow-main {
  756. position: absolute;
  757. }
  758. }
  759. }
  760. .box-app {
  761. display: inline-block;
  762. float: left;
  763. margin-left: 30px;
  764. line-height: 50px;
  765. }
  766. /deep/.el-dialog {
  767. .el-form-item {
  768. margin-bottom: 0 !important;
  769. .el-input--medium {
  770. textarea {
  771. min-height: 100px !important;
  772. }
  773. }
  774. }
  775. }
  776. .collapse-bottom {
  777. margin-bottom: 20px;
  778. }
  779. .input-main .textarea .el-textarea__inner {
  780. width: 100%;
  781. z-index: 1;
  782. }
  783. .collapse-bottom {
  784. margin-bottom: 20px;
  785. }
  786. .input-main .textarea .el-textarea__inner {
  787. width: 100%;
  788. z-index: 1;
  789. }
  790. .bg-left {
  791. padding-left: 10px;
  792. }
  793. .bg-right {
  794. padding-right: 10px;
  795. text-align: right;
  796. }
  797. .bg-bottom {
  798. margin: 20px 0px;
  799. }
  800. .remark h3 {
  801. display: inline-block;
  802. margin-right: 20px;
  803. }
  804. .remark p {
  805. display: inline-block;
  806. }
  807. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  808. /* height: 82px;*/
  809. /*}*/
  810. // 控制select为只读的时候显示样式
  811. .hide-sel {
  812. .el-input__inner {
  813. border: 0px;
  814. }
  815. .el-icon-arrow-up {
  816. display: none;
  817. }
  818. .el-textarea__inner {
  819. background-color: #fff !important;
  820. border: 0;
  821. }
  822. .el-date-editor {
  823. i {
  824. display: none;
  825. }
  826. }
  827. .is-disabled {
  828. .el-input__inner:hover {
  829. background-color: #fff !important;
  830. border: 0;
  831. }
  832. color: #606266;
  833. .el-input__inner {
  834. background-color: #fff !important;
  835. border: 0;
  836. color: #606266;
  837. }
  838. .el-textarea__inner {
  839. background-color: #fff !important;
  840. border: 0;
  841. color: #606266;
  842. }
  843. }
  844. }
  845. // 控制select为只读的时候显示样式
  846. /deep/.ws-class-table-col {
  847. height: auto;
  848. padding: 0px 2px;
  849. /deep/.el-input__inner {
  850. padding: 0px 2px;
  851. }
  852. }
  853. /deep/.is-disabled {
  854. .el-input__prefix,
  855. .el-input__suffix {
  856. display: none;
  857. }
  858. .el-input__inner {
  859. background-color: #fff;
  860. border-color: #fff !important;
  861. color: #000 !important;
  862. font-size: 14px;
  863. cursor: text;
  864. padding: 0 !important;
  865. }
  866. }
  867. .winseaview-view {
  868. padding: 10px 0 20px;
  869. }
  870. .container {
  871. overflow: scroll;
  872. height: 93vh;
  873. }
  874. </style>