salesContractEdit.vue 51 KB

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