salesContractAdd.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653
  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="vertion-align: bottom; margin-right: 3px"
  17. src="../../../public/img/lujing.png"
  18. alt=""
  19. />返回</el-button
  20. >
  21. </el-col>
  22. </el-row>
  23. <div class="wenzi">
  24. <h3>基本信息</h3>
  25. <p>
  26. &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
  27. 标记的条目提交后不可修改。
  28. </p>
  29. </div>
  30. <div class="center">
  31. <ws-form ref="deptBudgetList" :model="deptBudgetList">
  32. <!--基本信息-->
  33. <ws-info-table>
  34. <!--合同编号-->
  35. <ws-form-item
  36. label="合同编号"
  37. span="1"
  38. prop="contractNo"
  39. class="readonly"
  40. >
  41. <ws-input
  42. v-model="deptBudgetList.contractNo"
  43. placeholder="请输入合同编号"
  44. maxlength="20"
  45. size="small"
  46. :rules="ruleDeptBudget"
  47. />
  48. </ws-form-item>
  49. <!--运输方式-->
  50. <ws-form-item label="运输方式" span="1" prop="shippingType">
  51. <ws-input
  52. v-model="deptBudgetList.shippingType"
  53. placeholder="请输入运输方式"
  54. maxlength="20"
  55. size="small"
  56. />
  57. </ws-form-item>
  58. <!--买方-->
  59. <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
  60. <ws-input
  61. v-model="deptBudgetList.buyer"
  62. placeholder="请输入买方名称"
  63. maxlength="100"
  64. size="small"
  65. />
  66. </ws-form-item>
  67. <!--结算方式-->
  68. <ws-form-item label="结算方式" span="1" prop="settlementMethod">
  69. <ws-input
  70. v-model="deptBudgetList.settlementMethod"
  71. placeholder="请输入结算方式"
  72. maxlength="120"
  73. size="small"
  74. />
  75. </ws-form-item>
  76. <!--卖方-->
  77. <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
  78. <ws-input
  79. v-model="deptBudgetList.seller"
  80. placeholder="请输入卖方名称"
  81. maxlength="100"
  82. size="small"
  83. />
  84. </ws-form-item>
  85. <ws-form-item
  86. label="交货方式"
  87. span="1"
  88. prop="seller"
  89. class="readonly"
  90. >
  91. <el-radio v-model="deptBudgetList.deliverType" label="1"
  92. >我方自提</el-radio
  93. >
  94. <el-radio v-model="deptBudgetList.deliverType" label="2"
  95. >对方送货</el-radio
  96. >
  97. </ws-form-item>
  98. <!--买方电话-->
  99. <ws-form-item label="买方电话" span="1" prop="contractNo">
  100. <ws-input
  101. v-model.number="deptBudgetList.buyerPhone"
  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="sellerPhone">
  125. <ws-input
  126. v-model="deptBudgetList.sellerPhone"
  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
  191. style="
  192. text-align: right;
  193. border-top: 1px solid #dcdfe6;
  194. padding: 5px;
  195. "
  196. >
  197. <ws-button type="primary" @click.stop="addClick">{{
  198. $t('button.add')
  199. }}</ws-button>
  200. </div>
  201. </el-option>
  202. </el-select>
  203. </ws-form-item>
  204. <!--重量(吨)-->
  205. <ws-form-item label="重量(吨)" span="1" prop="weight">
  206. <ws-input
  207. v-model="deptBudgetList.weight"
  208. placeholder="请输入重量(吨)"
  209. maxlength="100"
  210. size="small"
  211. />
  212. </ws-form-item>
  213. <!--交货日期(起)-->
  214. <ws-form-item
  215. label="交货日期(起)"
  216. span="1"
  217. prop="deliveryDateStart"
  218. >
  219. <ws-date-picker
  220. v-model="deptBudgetList.deliveryDateStart"
  221. type="date"
  222. placeholder="请选择交货日期(起)"
  223. value-format="yyyy-MM-dd"
  224. />
  225. </ws-form-item>
  226. <!--溢短装(%)-->
  227. <ws-form-item label="溢短装(%)" span="1" prop="overShort">
  228. <ws-input
  229. v-model="deptBudgetList.overShort"
  230. placeholder="请输入溢短装比例(%)"
  231. maxlength="100"
  232. size="small"
  233. />
  234. </ws-form-item>
  235. <!--交货日期(止)-->
  236. <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
  237. <ws-date-picker
  238. v-model="deptBudgetList.deliveryDateEnd"
  239. type="date"
  240. placeholder="请选择交货日期(止)"
  241. value-format="yyyy-MM-dd"
  242. />
  243. </ws-form-item>
  244. <!--合同单价(元/吨)-->
  245. <ws-form-item
  246. class="readonly"
  247. label="合同单价(元/吨)"
  248. span="1"
  249. prop="unitContractPrice"
  250. >
  251. <ws-input
  252. v-model="deptBudgetList.unitContractPrice"
  253. placeholder="请输入合同单价"
  254. maxlength="100"
  255. size="small"
  256. />
  257. </ws-form-item>
  258. <!--合同总价-->
  259. <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
  260. <ws-input
  261. v-model="deptBudgetList.totalContractPrice"
  262. placeholder="请输入合同总价"
  263. maxlength="100"
  264. size="small"
  265. />
  266. </ws-form-item>
  267. <ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
  268. <el-cascader
  269. :options="options_"
  270. v-model="selectedOptions"
  271. clearable
  272. size="large"
  273. placeholder="请选择货源所在地区"
  274. style="width: 200%"
  275. @change="handleChange"
  276. />
  277. </ws-form-item>
  278. <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
  279. <ws-input
  280. v-model="deptBudgetList.sourceGoods"
  281. placeholder="请输入货源详细地址"
  282. maxlength="20"
  283. size="small"
  284. />
  285. </ws-form-item>
  286. <ws-form-item label="交货所在地区" span="1" prop="sourceGoods">
  287. <el-cascader
  288. :options="options_"
  289. v-model="selectedOptions1"
  290. clearable
  291. size="large"
  292. placeholder="请选择交货所在地区"
  293. style="width: 200%"
  294. @change="handleChange1"
  295. />
  296. </ws-form-item>
  297. <ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
  298. <ws-input
  299. v-model="deptBudgetList.placeDelivery"
  300. placeholder="请输入交货详细地址"
  301. maxlength="20"
  302. size="small"
  303. />
  304. </ws-form-item>
  305. <!--签订日期-->
  306. <ws-form-item label="签订日期" span="1" prop="signingDate">
  307. <ws-date-picker
  308. v-model="deptBudgetList.signingDate"
  309. type="date"
  310. placeholder="请选择合同签订日期"
  311. value-format="yyyy-MM-dd"
  312. />
  313. </ws-form-item>
  314. <ws-form-item
  315. label="最终实际成交量(吨)"
  316. span="1"
  317. prop="finalTradingVolume"
  318. >
  319. <ws-input
  320. v-model="deptBudgetList.finalTradingVolume"
  321. placeholder="请输入最终实际成交量"
  322. maxlength="100"
  323. size="small"
  324. />
  325. </ws-form-item>
  326. </ws-info-table>
  327. </ws-form>
  328. </div>
  329. <div class="wenzi">
  330. <h3>货物信息</h3>
  331. </div>
  332. <div class="center">
  333. <ws-form
  334. ref="deptBudgetList"
  335. :rules="ruleDeptBudget"
  336. :model="deptBudgetList"
  337. >
  338. <!--货物信息-->
  339. <ws-info-table>
  340. <!--货名-->
  341. <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
  342. <ws-select
  343. v-model="deptBudgetList.contractGoodsInfo.goodsName"
  344. placeholder=""
  345. class="typeselect"
  346. @change="selectpackingMethod"
  347. >
  348. <ws-option
  349. v-for="item in goodnameList"
  350. :key="item.constKey"
  351. :label="item.constValue"
  352. :value="item.constValue"
  353. />
  354. </ws-select>
  355. </ws-form-item>
  356. <!--水分(%)<=-->
  357. <ws-form-item label="水分(%)" span="1" prop="waterContent">
  358. <ws-input
  359. v-model="deptBudgetList.contractGoodsInfo.waterContent"
  360. placeholder="请输入水分占比"
  361. maxlength="100"
  362. size="small"
  363. />
  364. </ws-form-item>
  365. <!--品级-->
  366. <ws-form-item label="品级" span="1" prop="grade" class="readonly">
  367. <ws-select
  368. v-model="deptBudgetList.contractGoodsInfo.grade"
  369. placeholder=""
  370. class="typeselect"
  371. @change="selectgrade"
  372. >
  373. <ws-option
  374. v-for="item in gradeList"
  375. :key="item.constKey"
  376. :label="item.constValue"
  377. :value="item.constValue"
  378. />
  379. </ws-select>
  380. </ws-form-item>
  381. <!--杂质(%)<=-->
  382. <ws-form-item label="杂质(%)" span="1" prop="impurity">
  383. <ws-input
  384. v-model="deptBudgetList.contractGoodsInfo.impurity"
  385. placeholder="请输入杂质占比(%)"
  386. maxlength="40"
  387. size="small"
  388. />
  389. </ws-form-item>
  390. <!--容量(克/升)>=-->
  391. <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
  392. <ws-input
  393. v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
  394. placeholder="请输入容重"
  395. maxlength="40"
  396. size="small"
  397. />
  398. </ws-form-item>
  399. <!--霉变粒(%)<=-->
  400. <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
  401. <ws-input
  402. v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
  403. placeholder="请输入霉变粒占比(%)"
  404. maxlength="40"
  405. size="small"
  406. />
  407. </ws-form-item>
  408. <!--热损伤(%)<=-->
  409. <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
  410. <ws-input
  411. v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
  412. placeholder="请输入输入热损伤占比(%)"
  413. maxlength="40"
  414. size="small"
  415. />
  416. </ws-form-item>
  417. <!--不完整粒(%)<=-->
  418. <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
  419. <ws-input
  420. v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
  421. placeholder="请输入不完整粒占比(%)"
  422. maxlength="40"
  423. size="small"
  424. />
  425. </ws-form-item>
  426. </ws-info-table>
  427. </ws-form>
  428. </div>
  429. <div class="wenzi">
  430. <h3>流程信息</h3>
  431. </div>
  432. <div class="center">
  433. <ws-form
  434. ref="deptBudgetList"
  435. :rules="ruleDeptBudget"
  436. :model="deptBudgetList"
  437. >
  438. <!--流程信息-->
  439. <ws-info-table>
  440. <!--合同收入(元)-->
  441. <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
  442. <ws-input
  443. v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
  444. placeholder="请输入合同收入(元)"
  445. maxlength="100"
  446. size="small"
  447. />
  448. </ws-form-item>
  449. <!--已开发票(元)-->
  450. <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
  451. <ws-input
  452. v-model="deptBudgetList.contractProcessInfo.goodsName"
  453. placeholder="请输入已开发票(元)"
  454. maxlength="100"
  455. size="small"
  456. />
  457. </ws-form-item>
  458. <!--费用支出(元)-->
  459. <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
  460. <ws-input
  461. v-model="deptBudgetList.contractProcessInfo.waterContent"
  462. placeholder="请输入费用支出(元)"
  463. maxlength="100"
  464. size="small"
  465. />
  466. </ws-form-item>
  467. <!--未开发票(元)-->
  468. <ws-form-item label="未开发票(元)" span="1" prop="impurity">
  469. <ws-input
  470. v-model="deptBudgetList.contractProcessInfo.impurity"
  471. placeholder="请输入未开发票(元)"
  472. maxlength="100"
  473. size="small"
  474. />
  475. </ws-form-item>
  476. <!--未回款(元)-->
  477. <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
  478. <ws-input
  479. v-model="deptBudgetList.contractProcessInfo.mildewGrain"
  480. placeholder="请输入未回款(元)"
  481. maxlength="100"
  482. size="small"
  483. />
  484. </ws-form-item>
  485. <!--已完成发货量(吨)-->
  486. <ws-form-item
  487. label="已完成发运量(吨)"
  488. span="1"
  489. prop="imperfectGrain"
  490. >
  491. <ws-input
  492. v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
  493. placeholder="请输入已完成发运量(吨)"
  494. maxlength="100"
  495. size="small"
  496. />
  497. </ws-form-item>
  498. <!--双章原件回收情况-->
  499. <ws-form-item label="双章原件回收情况" span="1" prop="grade">
  500. <ws-select
  501. v-model="deptBudgetList.contractProcessInfo.grade"
  502. placeholder=""
  503. class="typeselect"
  504. @change="selectpackingMethod"
  505. >
  506. <ws-option
  507. v-for="item in ChapterTwoList"
  508. :key="item.constKey"
  509. :label="item.constValue"
  510. :value="item.constValue"
  511. />
  512. </ws-select>
  513. </ws-form-item>
  514. </ws-info-table>
  515. </ws-form>
  516. </div>
  517. <div class="wenzi">
  518. <h3>备注信息</h3>
  519. </div>
  520. <div class="ce">
  521. <ws-form
  522. ref="deptBudgetList"
  523. :rules="ruleDeptBudget"
  524. :model="deptBudgetList"
  525. >
  526. <!--备注信息-->
  527. <ws-input
  528. v-model="deptBudgetList.remarks"
  529. type="textarea"
  530. row="3"
  531. placeholder="请输入备注信息,不超过200字"
  532. maxlength="200"
  533. />
  534. <ws-upload
  535. ref="upload"
  536. table-name="maintain_work_order"
  537. oss-key="mainPlan"
  538. :comp-id="compId"
  539. :appendix-ids="appendixIdsAdd"
  540. :vesselId="deptBudgetList.addressUrl"
  541. :size-limit="size"
  542. @uploadSuccess="uploadSuccess"
  543. @onChange="onChange"
  544. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
  545. />
  546. </ws-form>
  547. </div>
  548. <div style="text-align: right; padding: 10px" class="center">
  549. <el-button
  550. class="bg-bottom"
  551. type="primary"
  552. size="small"
  553. @click="submit(deptBudgetList)"
  554. >提交</el-button
  555. >
  556. </div>
  557. </div>
  558. </template>
  559. <script>
  560. // import { getVesselOne } from '@/model/procurement/basic'
  561. // import { dayjs } from 'base-core-lib'
  562. import {
  563. packList,
  564. addList,
  565. xiala,
  566. addxiala,
  567. editxiala,
  568. delxiala,
  569. } from '@/model/contarct/index'
  570. import WsUpload from '@/components/WsUpload'
  571. import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
  572. export default {
  573. name: 'viewSpareMoney',
  574. components: {
  575. WsUpload,
  576. },
  577. watch: {
  578. vesselId(val) {
  579. this.getVesselData()
  580. },
  581. isShow(val) {
  582. this.showType = val
  583. },
  584. },
  585. data() {
  586. return {
  587. //弹出框
  588. dialogViewSpareMoney: false,
  589. dialogApproveFormVisible: false,
  590. // 船舶类型
  591. monetaryKey: null,
  592. // 表格显示数据
  593. tableDate: [],
  594. // 是否显示
  595. showType: true,
  596. // 年
  597. year: '',
  598. options_: regionData,
  599. selectedOptions: [],
  600. selectedOptions1: [],
  601. // 提交类型
  602. submitType: true,
  603. tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
  604. trainingMethods: {},
  605. packtypeList: [],
  606. compId: sessionStorage.getItem('ws-pf_compId'),
  607. mainReportAdd: {},
  608. appendixIdsAdd: '',
  609. size: 10,
  610. // uploadSuccess: {},
  611. // onChange:{},
  612. unitList: [],
  613. goodnameList: [],
  614. gradeList: [],
  615. ChapterTwoList: [],
  616. deptBudgetList: {
  617. deliverType: '1',
  618. finalTradingVolume: 0,
  619. contractGoodsInfo: {
  620. goodsName: '',
  621. },
  622. contractProcessInfo: {},
  623. },
  624. pickerBeginDateBefore: {
  625. disabledDate: (time) => {
  626. return time.getTime() > Date.now()
  627. },
  628. },
  629. ruleDeptBudget: {
  630. contractNo: [
  631. { required: true, message: '请输入活动名称', trigger: 'blur' },
  632. {
  633. min: 6,
  634. max: 20,
  635. message: '长度在 6 到 20 个字符',
  636. trigger: 'blur',
  637. },
  638. ],
  639. },
  640. selectIntendedShip: {},
  641. interviewTypeList: {},
  642. }
  643. },
  644. activated() {
  645. //cg.viewBudget
  646. //cg.viewSpareMoney
  647. // this.getVesselData();
  648. this.deptBudgetList.packingMethod = '散装'
  649. this.deptBudgetList.packingMethodKey = 1
  650. this.deptBudgetList.contractGoodsInfo.goodsName = '玉米'
  651. this.deptBudgetList.contractGoodsInfo.goodsNameKey = 1
  652. this.deptBudgetList.contractProcessInfo.grade = '未回收'
  653. this.deptBudgetList.contractProcessInfo.gradeKey = 1
  654. this.deptBudgetList.contractGoodsInfo.grade = '一等品'
  655. this.deptBudgetList.contractGoodsInfo.gradeKey = 1
  656. this.loaddata()
  657. this.showType = this.isShow
  658. },
  659. methods: {
  660. // 关闭 dialog时 处理文件url 初始化upload组件
  661. handleClose() {
  662. this.dialogViewSpareMoney = false
  663. },
  664. handleChange(value) {
  665. this.selectedOptions = value
  666. },
  667. handleChange1(value) {
  668. this.selectedOptions1 = value
  669. },
  670. returnsales() {
  671. this.$router.push({ path: 'salesContract' })
  672. },
  673. loaddata() {
  674. // 包装方式
  675. packList({ constId: 'CON1' })
  676. .toPromise()
  677. .then((response) => {
  678. this.packtypeList = response
  679. })
  680. // 验收方式
  681. this.getUnitList()
  682. // 货名
  683. packList({ constId: 'CON2' })
  684. .toPromise()
  685. .then((response) => {
  686. this.goodnameList = response
  687. })
  688. // 品级
  689. packList({ constId: 'CON3' })
  690. .toPromise()
  691. .then((response) => {
  692. this.gradeList = response
  693. })
  694. // 双章
  695. packList({ constId: 'CON4' })
  696. .toPromise()
  697. .then((response) => {
  698. this.ChapterTwoList = response
  699. })
  700. },
  701. // 上传附件
  702. uploadSuccess(data, files, url) {
  703. console.log(data, files, url)
  704. // this.deptBudgetList.
  705. // this.formData.append('files', files)
  706. // this.feedbackObj.uploadNameAttachment = data.appendixName
  707. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  708. // // this.newAppendixs = files
  709. // this.onChangeFlag = true
  710. },
  711. onChange(files) {
  712. this.fileNum = files
  713. this.$refs.upload.handleSaveBill().then((res) => {
  714. console.log(files)
  715. })
  716. },
  717. getUnitList() {
  718. xiala({
  719. compId: sessionStorage.getItem('ws-pf_compId'),
  720. constCode: 'TYPEYAN',
  721. })
  722. .toPromise()
  723. .then((response) => {
  724. this.unitList = response
  725. let currItem
  726. this.unitList.forEach((item, index, arr) => {
  727. item.flag = 'delete'
  728. if (this.vModel == item.constKey) {
  729. currItem = item
  730. }
  731. })
  732. //
  733. if (currItem) {
  734. this.selectContract(currItem.constValue)
  735. }
  736. })
  737. },
  738. submit() {
  739. if (!this.deptBudgetList.contractNo) {
  740. this.$message({
  741. message: '请输入合同编号',
  742. type: 'warning',
  743. })
  744. return
  745. }
  746. if (
  747. this.deptBudgetList.contractNo.length < 6 ||
  748. this.deptBudgetList.contractNo.length > 20
  749. ) {
  750. this.$message({
  751. message: '合同编号长度不符合要求,请输入6到20个字符之内!',
  752. type: 'warning',
  753. })
  754. return
  755. }
  756. if (!this.deptBudgetList.shippingType) {
  757. this.$message({
  758. message: '请输入运输方式!',
  759. type: 'warning',
  760. })
  761. return
  762. }
  763. if (
  764. this.deptBudgetList.shippingType.length < 1 ||
  765. this.deptBudgetList.shippingType.length > 20
  766. ) {
  767. this.$message({
  768. message: '运输方式长度不符合要求,请输入1到20个字符之内!',
  769. type: 'warning',
  770. })
  771. return
  772. }
  773. if (!this.deptBudgetList.buyer) {
  774. this.$message({
  775. message: '请输入买方名称!',
  776. type: 'warning',
  777. })
  778. return
  779. }
  780. if (this.deptBudgetList.buyer.length > 30) {
  781. this.$message({
  782. message: '买方名称长度不符合要求,请输入30个字符之内!',
  783. type: 'warning',
  784. })
  785. return
  786. }
  787. if (!this.deptBudgetList.seller) {
  788. this.$message({
  789. message: '请输入卖方名称!',
  790. type: 'warning',
  791. })
  792. return
  793. }
  794. if (this.deptBudgetList.seller.length > 30) {
  795. this.$message({
  796. message: '卖方名称长度不符合要求,请输入30个字符之内!',
  797. type: 'warning',
  798. })
  799. return
  800. }
  801. if (!this.deptBudgetList.buyerPhone) {
  802. this.$message({
  803. message: '请输入买方电话!',
  804. type: 'warning',
  805. })
  806. return
  807. }
  808. if (isNaN(this.deptBudgetList.buyerPhone)) {
  809. this.$message({
  810. message: '输入买方电话有误!',
  811. type: 'warning',
  812. })
  813. return
  814. }
  815. if (
  816. this.deptBudgetList.buyerPhone.length < 7 ||
  817. this.deptBudgetList.buyerPhone.length > 20
  818. ) {
  819. this.$message({
  820. message: '买方电话长度不符合要求,请输入7到20个字符之内!',
  821. type: 'warning',
  822. })
  823. return
  824. }
  825. if (!this.deptBudgetList.sellerPhone) {
  826. this.$message({
  827. message: '请输入卖方电话!',
  828. type: 'warning',
  829. })
  830. return
  831. }
  832. if (isNaN(this.deptBudgetList.sellerPhone)) {
  833. this.$message({
  834. message: '输入卖方电话有误!',
  835. type: 'warning',
  836. })
  837. return
  838. }
  839. if (
  840. this.deptBudgetList.buyerPhone.length < 7 ||
  841. this.deptBudgetList.buyerPhone.length > 20
  842. ) {
  843. this.$message({
  844. message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
  845. type: 'warning',
  846. })
  847. return
  848. }
  849. if (!this.deptBudgetList.settlementMethod) {
  850. this.$message({
  851. message: '请输入结算方式!',
  852. type: 'warning',
  853. })
  854. return
  855. }
  856. if (!this.deptBudgetList.sourceGoods) {
  857. this.$message({
  858. message: '请输入货源详细地址!',
  859. type: 'warning',
  860. })
  861. return
  862. }
  863. if (!this.deptBudgetList.placeDelivery) {
  864. this.$message({
  865. message: '请输入交货详细地址!',
  866. type: 'warning',
  867. })
  868. return
  869. }
  870. if (this.selectedOptions.length == 0) {
  871. this.$message({
  872. message: '请选择货源所在地区!',
  873. type: 'warning',
  874. })
  875. return
  876. }
  877. if (this.selectedOptions1.length == 0) {
  878. this.$message({
  879. message: '请选择交货所在地区!',
  880. type: 'warning',
  881. })
  882. return
  883. }
  884. if (!this.deptBudgetList.weight) {
  885. this.$message({
  886. message: '请输入重量!',
  887. type: 'warning',
  888. })
  889. return
  890. }
  891. if (
  892. isNaN(this.deptBudgetList.weight) ||
  893. (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
  894. String(this.deptBudgetList.weight).length -
  895. (String(this.deptBudgetList.weight).indexOf('.') + 1) >
  896. 3) ||
  897. this.deptBudgetList.weight < 0 ||
  898. this.deptBudgetList.weight > 200000
  899. ) {
  900. this.$message({
  901. message: '输入重量有误!',
  902. type: 'warning',
  903. })
  904. return
  905. }
  906. if (
  907. !this.deptBudgetList.overShort &&
  908. isNaN(this.deptBudgetList.overShort)
  909. ) {
  910. this.$message({
  911. message: '溢短装输入有误!',
  912. type: 'warning',
  913. })
  914. return
  915. }
  916. if (
  917. !this.deptBudgetList.unitContractPrice &&
  918. isNaN(this.deptBudgetList.unitContractPrice)
  919. ) {
  920. this.$message({
  921. message: '合同单价输入有误!',
  922. type: 'warning',
  923. })
  924. return
  925. }
  926. if (
  927. !this.deptBudgetList.totalContractPrice &&
  928. isNaN(this.deptBudgetList.totalContractPrice)
  929. ) {
  930. this.$message({
  931. message: '合同总价输入有误!',
  932. type: 'warning',
  933. })
  934. return
  935. }
  936. if (!this.deptBudgetList.deliveryDateStart) {
  937. this.$message({
  938. message: '请选择交货日期(起)',
  939. type: 'warning',
  940. })
  941. return
  942. }
  943. if (!this.deptBudgetList.deliveryDateEnd) {
  944. this.$message({
  945. message: '请选择交货日期(止)',
  946. type: 'warning',
  947. })
  948. return
  949. }
  950. //时间
  951. if (
  952. new Date(this.deptBudgetList.deliveryDateStart).getTime() >
  953. new Date(this.deptBudgetList.deliveryDateEnd).getTime()
  954. ) {
  955. this.$message({
  956. message: '交货日期(止)选择错误',
  957. type: 'warning',
  958. })
  959. return
  960. }
  961. if (!this.deptBudgetList.signingDate) {
  962. this.$message({
  963. message: '请选择签订日期',
  964. type: 'warning',
  965. })
  966. return
  967. }
  968. if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
  969. this.$message({
  970. message: '请选择货名',
  971. type: 'warning',
  972. })
  973. return
  974. }
  975. if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
  976. this.$message({
  977. message: '请选择水分',
  978. type: 'warning',
  979. })
  980. return
  981. }
  982. if (!this.deptBudgetList.contractGoodsInfo.grade) {
  983. this.$message({
  984. message: '请选择品级',
  985. type: 'warning',
  986. })
  987. return
  988. }
  989. if (
  990. !this.deptBudgetList.contractGoodsInfo.impurity ||
  991. (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
  992. -1 &&
  993. String(this.deptBudgetList.contractGoodsInfo.impurity).length -
  994. (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
  995. '.'
  996. ) +
  997. 1) >
  998. 2)
  999. ) {
  1000. this.$message({
  1001. message: '杂质输入错误',
  1002. type: 'warning',
  1003. })
  1004. return
  1005. }
  1006. if (
  1007. !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
  1008. (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
  1009. '.'
  1010. ) != -1 &&
  1011. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
  1012. (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
  1013. '.'
  1014. ) +
  1015. 1) >
  1016. 2)
  1017. ) {
  1018. this.$message({
  1019. message: '容重输入错误',
  1020. type: 'warning',
  1021. })
  1022. return
  1023. }
  1024. if (
  1025. !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
  1026. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1027. '.'
  1028. ) != -1 &&
  1029. String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
  1030. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1031. '.'
  1032. ) +
  1033. 1) >
  1034. 2)
  1035. ) {
  1036. this.$message({
  1037. message: '霉变粒输入错误',
  1038. type: 'warning',
  1039. })
  1040. return
  1041. }
  1042. if (
  1043. !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
  1044. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
  1045. -1 &&
  1046. String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
  1047. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
  1048. '.'
  1049. ) +
  1050. 1) >
  1051. 2)
  1052. ) {
  1053. this.$message({
  1054. message: '热损伤输入错误',
  1055. type: 'warning',
  1056. })
  1057. return
  1058. }
  1059. if (
  1060. !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
  1061. (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
  1062. '.'
  1063. ) != -1 &&
  1064. String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
  1065. (String(
  1066. this.deptBudgetList.contractGoodsInfo.imperfectGrain
  1067. ).indexOf('.') +
  1068. 1) >
  1069. 2)
  1070. ) {
  1071. this.$message({
  1072. message: '不完整粒输入错误',
  1073. type: 'warning',
  1074. })
  1075. return
  1076. }
  1077. if (
  1078. (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
  1079. (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
  1080. (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
  1081. '.'
  1082. ) != -1 &&
  1083. String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
  1084. (String(
  1085. this.deptBudgetList.contractProcessInfo.goodsNameKey
  1086. ).indexOf('.') +
  1087. 1) >
  1088. 2)
  1089. ) {
  1090. this.$message({
  1091. message: '合同收入金额输入错误',
  1092. type: 'warning',
  1093. })
  1094. return
  1095. }
  1096. if (
  1097. (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
  1098. (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
  1099. (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
  1100. '.'
  1101. ) != -1 &&
  1102. String(this.deptBudgetList.contractProcessInfo.waterContent).length -
  1103. (String(
  1104. this.deptBudgetList.contractProcessInfo.waterContent
  1105. ).indexOf('.') +
  1106. 1) >
  1107. 2)
  1108. ) {
  1109. this.$message({
  1110. message: '费用金额输入错误',
  1111. type: 'warning',
  1112. })
  1113. return
  1114. }
  1115. if (
  1116. (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
  1117. (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
  1118. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1119. '.'
  1120. ) != -1 &&
  1121. String(this.deptBudgetList.contractProcessInfo.goodsName).length -
  1122. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1123. '.'
  1124. ) +
  1125. 1) >
  1126. 2)
  1127. ) {
  1128. this.$message({
  1129. message: '已开发票金额输入错误',
  1130. type: 'warning',
  1131. })
  1132. return
  1133. }
  1134. if (
  1135. (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
  1136. (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
  1137. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1138. '.'
  1139. ) != -1 &&
  1140. String(this.deptBudgetList.contractProcessInfo.impurity).length -
  1141. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1142. '.'
  1143. ) +
  1144. 1) >
  1145. 2)
  1146. ) {
  1147. this.$message({
  1148. message: '未开发票金额输入错误',
  1149. type: 'warning',
  1150. })
  1151. return
  1152. }
  1153. if (
  1154. (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
  1155. (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
  1156. (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
  1157. '.'
  1158. ) != -1 &&
  1159. String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
  1160. .length -
  1161. (String(
  1162. this.deptBudgetList.contractProcessInfo.imperfectGrain
  1163. ).indexOf('.') +
  1164. 1) >
  1165. 2)
  1166. ) {
  1167. this.$message({
  1168. message: '已完成发运量输入错误',
  1169. type: 'warning',
  1170. })
  1171. return
  1172. }
  1173. if (
  1174. (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
  1175. (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
  1176. (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
  1177. '.'
  1178. ) != -1 &&
  1179. String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
  1180. (String(
  1181. this.deptBudgetList.contractProcessInfo.mildewGrain
  1182. ).indexOf('.') +
  1183. 1) >
  1184. 2)
  1185. ) {
  1186. this.$message({
  1187. message: '未回款金额输入错误',
  1188. type: 'warning',
  1189. })
  1190. return
  1191. }
  1192. this.$refs.deptBudgetList.validate((valid) => {
  1193. if (valid) {
  1194. this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
  1195. this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
  1196. this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
  1197. this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
  1198. this.deptBudgetList.compId = this.compId
  1199. this.deptBudgetList.contractType = 1
  1200. if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
  1201. this.deptBudgetList.deliveryArea = "特别行政区"
  1202. }else{
  1203. this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
  1204. }
  1205. if(this.deptBudgetList.sourceProvince =="澳门特别行政区" || this.deptBudgetList.sourceProvince == "澳门特别行政区"){
  1206. this.deptBudgetList.sourceArea = "特别行政区"
  1207. }else{
  1208. this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
  1209. }
  1210. addList(this.deptBudgetList)
  1211. .toPromise()
  1212. .then((response) => {
  1213. this.$message.success('添加成功')
  1214. this.deptBudgetList = {
  1215. deliverType: '1',
  1216. finalTradingVolume: 0,
  1217. contractGoodsInfo: {
  1218. goodsName: '',
  1219. },
  1220. contractProcessInfo: {},
  1221. }
  1222. this.$router.push({ path: 'salesContract' })
  1223. })
  1224. } else {
  1225. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1226. return false
  1227. }
  1228. })
  1229. },
  1230. resetForm(deptBudgetList) {
  1231. this.$refs[deptBudgetList].resetFields()
  1232. },
  1233. saveClick(item, index) {
  1234. console.log(item)
  1235. if (Object.is(item.id, 1)) {
  1236. return
  1237. }
  1238. if (Object.is(this.unitList[index].flag, 'delete')) {
  1239. this.$set(this.unitList, index, { flag: 'check' })
  1240. } else {
  1241. this.$set(this.unitList, index, { flag: 'delete' })
  1242. }
  1243. if (!item.constValue) {
  1244. this.unitList.splice(index, 1)
  1245. return
  1246. }
  1247. if (item.flag == 'add') {
  1248. item.constKey = Math.random() * 20
  1249. this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
  1250. this.trainingMethods.constKey = item.constKey
  1251. this.trainingMethods.constCode = 'TYPEYAN'
  1252. this.trainingMethods.constValue = item.constValue
  1253. this.trainingMethods.id = item.id
  1254. addxiala(this.trainingMethods)
  1255. .toPromise()
  1256. .then((response) => {
  1257. this.getUnitList()
  1258. })
  1259. } else if (item.flag == 'check') {
  1260. this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
  1261. this.trainingMethods.constKey = item.constKey
  1262. this.trainingMethods.constCode = 'TYPEYAN'
  1263. this.trainingMethods.constValue = item.constValue
  1264. this.trainingMethods.id = item.id
  1265. editxiala(this.trainingMethods)
  1266. .toPromise()
  1267. .then((response) => {
  1268. this.getUnitList()
  1269. })
  1270. }
  1271. },
  1272. // selectContract(val) {
  1273. // let key = this.unitList.find((item) => item.constValue === val).constKey
  1274. // this.pleaseChoose = val
  1275. // },
  1276. handleExamine() {},
  1277. approve() {},
  1278. // returnsales() {
  1279. // this.$router.push({ path: 'purchaseContract' })
  1280. // },
  1281. addClick() {
  1282. // let [flag, constValue, constKey] = ['check', '', '']
  1283. // let obj = { flag, constValue, constKey }
  1284. // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
  1285. // let result = this.unitList.filter((item, val, arr) => {
  1286. // return item.id != '1'
  1287. // })
  1288. // result.push(obj)
  1289. // result.push(objAdd)
  1290. // this.unitList = result
  1291. this.unitList.push({
  1292. flag: 'add',
  1293. constValue: '',
  1294. constKey: '',
  1295. })
  1296. },
  1297. selectChapterTwo(e) {
  1298. for (var i = 0; i < this.ChapterTwoList.length; i++) {
  1299. if (this.ChapterTwoList[i].constValue == e) {
  1300. this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
  1301. }
  1302. }
  1303. },
  1304. selectunitList(e) {
  1305. for (var i = 0; i < this.unitList.length; i++) {
  1306. if (this.unitList[i].constValue == e) {
  1307. this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
  1308. }
  1309. }
  1310. },
  1311. selectgrade(e) {
  1312. for (var i = 0; i < this.gradeList.length; i++) {
  1313. if (this.gradeList[i].constValue == e) {
  1314. this.deptBudgetList.gradeKey = this.gradeList[i].constKey
  1315. }
  1316. }
  1317. },
  1318. selectgoodsName(e) {
  1319. for (var i = 0; i < this.goodnameList.length; i++) {
  1320. if (this.goodnameList[i].constValue == e) {
  1321. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  1322. }
  1323. }
  1324. },
  1325. selectpackingMethod(e) {
  1326. for (var i = 0; i < this.packtypeList.length; i++) {
  1327. if (this.packtypeList[i].constValue == e) {
  1328. this.deptBudgetList.acceptanceMethodKey =
  1329. this.packtypeList[i].constKey
  1330. }
  1331. }
  1332. },
  1333. // 编辑
  1334. editClick(item, index) {
  1335. const map = JSON.parse(JSON.stringify(item))
  1336. if (Object.is(item.id, 1)) {
  1337. return
  1338. }
  1339. if (Object.is(this.unitList[index].flag, 'delete')) {
  1340. map.flag = 'check'
  1341. this.$set(this.unitList, index, map)
  1342. } else {
  1343. map.flag = 'delete'
  1344. this.$set(this.unitList, index, map)
  1345. }
  1346. },
  1347. // 删除
  1348. deleteClick(item, index) {
  1349. if (Object.is(item.constKey, 1)) {
  1350. return
  1351. }
  1352. if (!item.constValue) {
  1353. this.unitList.splice(index, 1)
  1354. return
  1355. }
  1356. delxiala({ id: this.unitList[index].id })
  1357. .toPromise()
  1358. .then((response) => {
  1359. this.getUnitList()
  1360. this.pleaseChoose = ''
  1361. })
  1362. },
  1363. },
  1364. }
  1365. </script>
  1366. <style lang="scss" scoped>
  1367. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1368. padding: 0 25px;
  1369. }
  1370. /deep/.ws-info-table .el-form-item {
  1371. border-right: 1px solid #cdd2dc;
  1372. border-bottom: 1px solid #cdd2dc;
  1373. }
  1374. .title {
  1375. position: relative;
  1376. }
  1377. .title::before {
  1378. content: '';
  1379. display: inline-block;
  1380. width: 5px;
  1381. height: 30px;
  1382. background: #5473e8;
  1383. position: absolute;
  1384. left: 0;
  1385. }
  1386. .el-button--primary {
  1387. background-color: #5878e8;
  1388. border-color: #5878e8;
  1389. }
  1390. .el-col {
  1391. background: #f6f7fc;
  1392. }
  1393. .readonly {
  1394. position: relative;
  1395. }
  1396. .readonly:after {
  1397. content: '*';
  1398. color: #ff2727;
  1399. position: absolute;
  1400. right: 8px;
  1401. z-index: 10;
  1402. top: 21%;
  1403. font-size: 20px;
  1404. }
  1405. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1406. padding: 0 25px;
  1407. border-left: 1px solid #cdd2dc;
  1408. background: #fafbfc;
  1409. }
  1410. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1411. width: 140px;
  1412. text-align: center;
  1413. background: #f0f2f6;
  1414. // border: 1px solid #cdd2dc;
  1415. }
  1416. .button-container {
  1417. display: flex;
  1418. flex-wrap: nowrap;
  1419. justify-content: space-between;
  1420. align-items: center;
  1421. background-color: #fff;
  1422. width: 100%;
  1423. height: 50px;
  1424. padding: 0 10px;
  1425. & > div {
  1426. margin-left: 10px;
  1427. display: flex;
  1428. flex-wrap: nowrap;
  1429. flex-direction: row;
  1430. & > span {
  1431. line-height: 50px;
  1432. }
  1433. }
  1434. /deep/.auditFlow-box {
  1435. position: unset;
  1436. margin-left: 10px;
  1437. &/deep/.auditFlow-icon {
  1438. width: auto;
  1439. padding-right: 30px;
  1440. }
  1441. &/deep/.auditFlow-main {
  1442. position: absolute;
  1443. }
  1444. }
  1445. }
  1446. .box-app {
  1447. display: inline-block;
  1448. float: left;
  1449. margin-left: 30px;
  1450. line-height: 50px;
  1451. }
  1452. /deep/.el-dialog {
  1453. .el-form-item {
  1454. margin-bottom: 0 !important;
  1455. .el-input--medium {
  1456. textarea {
  1457. min-height: 100px !important;
  1458. }
  1459. }
  1460. }
  1461. }
  1462. .collapse-bottom {
  1463. margin-bottom: 20px;
  1464. }
  1465. .input-main .textarea .el-textarea__inner {
  1466. width: 100%;
  1467. z-index: 1;
  1468. }
  1469. .bg-left {
  1470. padding-left: 30px;
  1471. }
  1472. .bg-right {
  1473. padding-right: 10px;
  1474. text-align: right;
  1475. }
  1476. .bg-bottom {
  1477. margin: 16px 0px;
  1478. }
  1479. .wenzi {
  1480. width: 70%;
  1481. margin: 0 auto;
  1482. }
  1483. .wenzi h3 {
  1484. display: inline-block;
  1485. left: 10px;
  1486. }
  1487. .wenzi p {
  1488. display: inline-block;
  1489. }
  1490. .center {
  1491. width: 70%;
  1492. margin: 0 auto;
  1493. }
  1494. .el-form-item {
  1495. width: 50%;
  1496. }
  1497. .el-form-item__label {
  1498. text-align: center;
  1499. }
  1500. .ce {
  1501. width: 70%;
  1502. margin: 0 auto;
  1503. }
  1504. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  1505. /* height: 82px;*/
  1506. /*}*/
  1507. // 控制select为只读的时候显示样式
  1508. .hide-sel {
  1509. .el-input__inner {
  1510. border: 0px;
  1511. }
  1512. .el-icon-arrow-up {
  1513. display: none;
  1514. }
  1515. .el-textarea__inner {
  1516. background-color: #fff !important;
  1517. border: 0;
  1518. }
  1519. .el-date-editor {
  1520. i {
  1521. display: none;
  1522. }
  1523. }
  1524. .is-disabled {
  1525. .el-input__inner:hover {
  1526. background-color: #fff !important;
  1527. border: 0;
  1528. }
  1529. color: #606266;
  1530. .el-input__inner {
  1531. background-color: #fff !important;
  1532. border: 0;
  1533. color: #606266;
  1534. }
  1535. .el-textarea__inner {
  1536. background-color: #fff !important;
  1537. border: 0;
  1538. color: #606266;
  1539. }
  1540. }
  1541. }
  1542. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1543. width: 130px;
  1544. }
  1545. //*号
  1546. .unchangeable {
  1547. position: absolute;
  1548. width: 9px;
  1549. height: 22px;
  1550. font-size: 16px;
  1551. font-family: PingFangSC-Medium, PingFang SC;
  1552. font-weight: 500;
  1553. color: #ff2727;
  1554. line-height: 22px;
  1555. display: inline-block;
  1556. right: 14px;
  1557. }
  1558. /deep/.el-input,
  1559. /deep/.el-date-editor {
  1560. font-size: 13px;
  1561. }
  1562. /deep/.el-textarea {
  1563. width: 101%;
  1564. margin: 0px;
  1565. }
  1566. /deep/el-date-editor--date {
  1567. width: 200px;
  1568. }
  1569. .unchanged {
  1570. position: absolute;
  1571. left: 37px;
  1572. width: 102px;
  1573. height: 14px;
  1574. font-size: 14px;
  1575. font-family: PingFangSC-Regular, PingFang SC;
  1576. font-weight: 400;
  1577. color: #afb5cb;
  1578. line-height: 14px;
  1579. }
  1580. /deep/.el-input--small .el-input__inner {
  1581. height: 32px;
  1582. line-height: 32px;
  1583. }
  1584. // 控制select为只读的时候显示样式
  1585. /deep/.ws-class-table-col {
  1586. height: auto;
  1587. padding: 0px 2px;
  1588. /deep/.el-input__inner {
  1589. padding: 0px 2px;
  1590. }
  1591. }
  1592. /deep/.is-disabled {
  1593. .el-input__prefix,
  1594. .el-input__suffix {
  1595. display: none;
  1596. }
  1597. .el-input__inner {
  1598. background-color: #fff;
  1599. border-color: #fff !important;
  1600. color: #000 !important;
  1601. font-size: 14px;
  1602. cursor: text;
  1603. padding: 0 !important;
  1604. }
  1605. }
  1606. .winseaview-view {
  1607. padding: 0 0 20px;
  1608. }
  1609. .container {
  1610. overflow: scroll;
  1611. height: 93vh;
  1612. }
  1613. </style>