salesContractEdit.vue 27 KB

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