salesContractEdit.vue 51 KB

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