purchaseContractEdit.vue 49 KB

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