salesContractEdit.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627
  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 (!this.deptBudgetList.sellerPhone) {
  785. this.$message({
  786. message: '请输入卖方电话!',
  787. type: 'warning',
  788. })
  789. return
  790. }
  791. if (isNaN(this.deptBudgetList.sellerPhone)) {
  792. this.$message({
  793. message: '输入卖方电话有误!',
  794. type: 'warning',
  795. })
  796. return
  797. }
  798. if (!this.deptBudgetList.acceptanceMethod) {
  799. this.$message({
  800. message: '请选择验收方式',
  801. type: 'warning',
  802. })
  803. return
  804. }
  805. if (!this.deptBudgetList.weight) {
  806. this.$message({
  807. message: '请输入重量!',
  808. type: 'warning',
  809. })
  810. return
  811. }
  812. if (
  813. isNaN(this.deptBudgetList.weight) ||
  814. (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
  815. String(this.deptBudgetList.weight).length -
  816. (String(this.deptBudgetList.weight).indexOf('.') + 1) >
  817. 3) ||
  818. this.deptBudgetList.weight < 0 ||
  819. this.deptBudgetList.weight > 200000
  820. ) {
  821. this.$message({
  822. message: '输入重量有误!',
  823. type: 'warning',
  824. })
  825. return
  826. }
  827. if (!this.deptBudgetList.deliveryDateStart) {
  828. this.$message({
  829. message: '请选择交货日期(起)',
  830. type: 'warning',
  831. })
  832. return
  833. }
  834. if (!this.deptBudgetList.overShort) {
  835. this.$message({
  836. message: '请输入溢短装!',
  837. type: 'warning',
  838. })
  839. return
  840. }
  841. if (
  842. isNaN(this.deptBudgetList.overShort) ||
  843. (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
  844. String(this.deptBudgetList.overShort).length -
  845. (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
  846. 2) ||
  847. this.deptBudgetList.overShort < 0 ||
  848. this.deptBudgetList.overShort > 50
  849. ) {
  850. this.$message({
  851. message: '溢短装输入有误!',
  852. type: 'warning',
  853. })
  854. return
  855. }
  856. if (!this.deptBudgetList.deliveryDateEnd) {
  857. this.$message({
  858. message: '请选择交货日期(止)',
  859. type: 'warning',
  860. })
  861. return
  862. }
  863. //时间
  864. if (
  865. new Date(this.deptBudgetList.deliveryDateStart).getTime() >
  866. new Date(this.deptBudgetList.deliveryDateEnd).getTime()
  867. ) {
  868. this.$message({
  869. message: '交货日期(止)选择错误',
  870. type: 'warning',
  871. })
  872. return
  873. }
  874. if (!this.deptBudgetList.unitContractPrice) {
  875. this.$message({
  876. message: '请输入合同单价!',
  877. type: 'warning',
  878. })
  879. return
  880. }
  881. if (
  882. isNaN(this.deptBudgetList.unitContractPrice) ||
  883. (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
  884. String(this.deptBudgetList.unitContractPrice).length -
  885. (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
  886. 2) ||
  887. this.deptBudgetList.unitContractPrice <= 0 ||
  888. this.deptBudgetList.unitContractPrice > 10000
  889. ) {
  890. this.$message({
  891. message: '合同单价输入有误!',
  892. type: 'warning',
  893. })
  894. return
  895. }
  896. if (!this.deptBudgetList.totalContractPrice) {
  897. this.$message({
  898. message: '请输入合同总价!',
  899. type: 'warning',
  900. })
  901. return
  902. }
  903. if (
  904. isNaN(this.deptBudgetList.totalContractPrice) ||
  905. (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
  906. String(this.deptBudgetList.totalContractPrice).length -
  907. (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
  908. 2) ||
  909. this.deptBudgetList.totalContractPrice <= 0 ||
  910. this.deptBudgetList.totalContractPrice > 1000000000
  911. ) {
  912. this.$message({
  913. message: '合同总价输入有误!',
  914. type: 'warning',
  915. })
  916. return
  917. }
  918. if (!this.newSelectedOptions) {
  919. this.$message({
  920. message: '请选择货源所在地区!',
  921. type: 'warning',
  922. })
  923. return
  924. }
  925. if (!this.deptBudgetList.sourceGoods) {
  926. this.$message({
  927. message: '请输入货源详细地址!',
  928. type: 'warning',
  929. })
  930. return
  931. }
  932. if (!this.newSelectedOptions1) {
  933. this.$message({
  934. message: '请选择交货所在地区!',
  935. type: 'warning',
  936. })
  937. return
  938. }
  939. if (!this.deptBudgetList.placeDelivery) {
  940. this.$message({
  941. message: '请输入交货详细地址!',
  942. type: 'warning',
  943. })
  944. return
  945. }
  946. if (!this.deptBudgetList.signingDate) {
  947. this.$message({
  948. message: '请选择签订日期',
  949. type: 'warning',
  950. })
  951. return
  952. }
  953. if (
  954. isNaN(this.deptBudgetList.finalTradingVolume) ||
  955. (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
  956. String(this.deptBudgetList.finalTradingVolume).length -
  957. (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
  958. 3) ||
  959. this.deptBudgetList.finalTradingVolume < 0 ||
  960. this.deptBudgetList.finalTradingVolume > 200000
  961. ) {
  962. this.$message({
  963. message: '最终实际成交量有误!',
  964. type: 'warning',
  965. })
  966. return
  967. }
  968. //货物信息
  969. if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
  970. this.$message({
  971. message: '请选择货名',
  972. type: 'warning',
  973. })
  974. return
  975. }
  976. if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
  977. this.$message({
  978. message: '请输入水分',
  979. type: 'warning',
  980. })
  981. return
  982. }
  983. if (
  984. this.deptBudgetList.contractGoodsInfo.waterContent &&
  985. String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
  986. String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
  987. (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
  988. 2 || this.deptBudgetList.contractGoodsInfo.waterContent > 40 || this.deptBudgetList.contractGoodsInfo
  989. .waterContent < 0
  990. ) {
  991. this.$message({
  992. message: '水分输入错误',
  993. type: 'warning',
  994. })
  995. return
  996. }
  997. if (!this.deptBudgetList.contractGoodsInfo.grade) {
  998. this.$message({
  999. message: '请选择品级',
  1000. type: 'warning',
  1001. })
  1002. return
  1003. }
  1004. if (!this.deptBudgetList.contractGoodsInfo.impurity) {
  1005. this.$message({
  1006. message: '请输入杂质',
  1007. type: 'warning',
  1008. })
  1009. return
  1010. }
  1011. if (
  1012. this.deptBudgetList.contractGoodsInfo.impurity &&
  1013. String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
  1014. String(this.deptBudgetList.contractGoodsInfo.impurity).length -
  1015. (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
  1016. 2 || this.deptBudgetList.contractGoodsInfo.impurity > 40 || this.deptBudgetList.contractGoodsInfo.impurity < 0
  1017. ) {
  1018. this.$message({
  1019. message: '杂质输入错误',
  1020. type: 'warning',
  1021. })
  1022. return
  1023. }
  1024. if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
  1025. this.$message({
  1026. message: '请输入容重',
  1027. type: 'warning',
  1028. })
  1029. return
  1030. }
  1031. if (
  1032. (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
  1033. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
  1034. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
  1035. (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
  1036. 2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo
  1037. .bulkDensity < 0
  1038. ) {
  1039. this.$message({
  1040. message: '容重输入错误',
  1041. type: 'warning',
  1042. })
  1043. return
  1044. }
  1045. if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
  1046. this.$message({
  1047. message: '请输入霉变粒',
  1048. type: 'warning',
  1049. })
  1050. return
  1051. }
  1052. if (
  1053. !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
  1054. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1055. '.'
  1056. ) != -1 &&
  1057. String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
  1058. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1059. '.'
  1060. ) +
  1061. 1) >
  1062. 2 || this.deptBudgetList.contractGoodsInfo.mildewGrain > 40 || this.deptBudgetList.contractGoodsInfo
  1063. .mildewGrain < 0)
  1064. ) {
  1065. this.$message({
  1066. message: '霉变粒输入错误',
  1067. type: 'warning',
  1068. })
  1069. return
  1070. }
  1071. if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
  1072. this.$message({
  1073. message: '请输入热损伤',
  1074. type: 'warning',
  1075. })
  1076. return
  1077. }
  1078. if (
  1079. !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
  1080. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
  1081. -1 &&
  1082. String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
  1083. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
  1084. '.'
  1085. ) +
  1086. 1) >
  1087. 2 || this.deptBudgetList.contractGoodsInfo.jiaorenli > 40 || this.deptBudgetList.contractGoodsInfo
  1088. .jiaorenli < 0)
  1089. ) {
  1090. this.$message({
  1091. message: '热损伤输入错误',
  1092. type: 'warning',
  1093. })
  1094. return
  1095. }
  1096. if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
  1097. this.$message({
  1098. message: '请输入不完善粒',
  1099. type: 'warning',
  1100. })
  1101. return
  1102. }
  1103. if (
  1104. !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
  1105. (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
  1106. '.'
  1107. ) != -1 &&
  1108. String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
  1109. (String(
  1110. this.deptBudgetList.contractGoodsInfo.imperfectGrain
  1111. ).indexOf('.') +
  1112. 1) >
  1113. 2 || this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 || this.deptBudgetList.contractGoodsInfo
  1114. .imperfectGrain < 0)
  1115. ) {
  1116. this.$message({
  1117. message: '不完善粒输入错误',
  1118. type: 'warning',
  1119. })
  1120. return
  1121. }
  1122. if(this.deptBudgetList.contractProcessInfo.goodsNameKey){
  1123. if (
  1124. (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
  1125. (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
  1126. (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
  1127. '.'
  1128. ) != -1 &&
  1129. String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
  1130. (String(
  1131. this.deptBudgetList.contractProcessInfo.goodsNameKey
  1132. ).indexOf('.') +
  1133. 1) >
  1134. 2)
  1135. ) {
  1136. this.$message({
  1137. message: '合同收入金额输入错误',
  1138. type: 'warning',
  1139. })
  1140. return
  1141. }
  1142. }
  1143. if (
  1144. (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
  1145. (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
  1146. (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
  1147. '.'
  1148. ) != -1 &&
  1149. String(this.deptBudgetList.contractProcessInfo.waterContent).length -
  1150. (String(
  1151. this.deptBudgetList.contractProcessInfo.waterContent
  1152. ).indexOf('.') +
  1153. 1) >
  1154. 2)
  1155. ) {
  1156. this.$message({
  1157. message: '费用支出输入错误',
  1158. type: 'warning',
  1159. })
  1160. return
  1161. }
  1162. if (
  1163. (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
  1164. (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
  1165. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1166. '.'
  1167. ) != -1 &&
  1168. String(this.deptBudgetList.contractProcessInfo.goodsName).length -
  1169. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1170. '.'
  1171. ) +
  1172. 1) >
  1173. 2)
  1174. ) {
  1175. this.$message({
  1176. message: '已开发票金额输入错误',
  1177. type: 'warning',
  1178. })
  1179. return
  1180. }
  1181. if (
  1182. (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
  1183. (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
  1184. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1185. '.'
  1186. ) != -1 &&
  1187. String(this.deptBudgetList.contractProcessInfo.impurity).length -
  1188. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1189. '.'
  1190. ) +
  1191. 1) >
  1192. 2)
  1193. ) {
  1194. this.$message({
  1195. message: '未开发票金额输入错误',
  1196. type: 'warning',
  1197. })
  1198. return
  1199. }
  1200. if (
  1201. (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
  1202. (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
  1203. (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
  1204. '.'
  1205. ) != -1 &&
  1206. String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
  1207. (String(
  1208. this.deptBudgetList.contractProcessInfo.mildewGrain
  1209. ).indexOf('.') +
  1210. 1) >
  1211. 2)
  1212. ) {
  1213. this.$message({
  1214. message: '未回款金额输入错误',
  1215. type: 'warning',
  1216. })
  1217. return
  1218. }
  1219. this.$confirm(`确定提交本次修改?`, {
  1220. cancelButtonText: '取消',
  1221. confirmButtonText: '确定',
  1222. type: 'warning'
  1223. })
  1224. .then(() => {
  1225. this.$refs.deptBudgetList.validate((valid) => {
  1226. if (valid) {
  1227. this.deptBudgetList.compId = this.compId
  1228. this.deptBudgetList.contractType = 1
  1229. editInfo(this.deptBudgetList)
  1230. .toPromise()
  1231. .then((response) => {
  1232. this.$message.success('编辑成功')
  1233. this.deptBudgetList = {}
  1234. this.$router.push({
  1235. path: 'salesContract'
  1236. })
  1237. })
  1238. } else {
  1239. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1240. return false
  1241. }
  1242. })
  1243. })
  1244. },
  1245. editInfo() {
  1246. editInfo({})
  1247. },
  1248. // getList(){}
  1249. },
  1250. }
  1251. </script>
  1252. <style lang="scss" scoped>
  1253. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1254. padding: 0 25px;
  1255. }
  1256. /deep/.ws-info-table .el-form-item {
  1257. border-right: 1px solid #cdd2dc;
  1258. border-bottom: 1px solid #cdd2dc;
  1259. }
  1260. .title {
  1261. position: relative;
  1262. }
  1263. .title::before {
  1264. content: '';
  1265. display: inline-block;
  1266. width: 5px;
  1267. height: 30px;
  1268. background: #5473e8;
  1269. position: absolute;
  1270. left: 0;
  1271. }
  1272. .el-button--primary {
  1273. background-color: #5878e8;
  1274. border-color: #5878e8;
  1275. }
  1276. .el-col {
  1277. background: #f6f7fc;
  1278. }
  1279. .readonly {
  1280. position: relative;
  1281. }
  1282. .readonly:after {
  1283. content: '*';
  1284. color: #ff2727;
  1285. position: absolute;
  1286. right: 8px;
  1287. z-index: 10;
  1288. top: 21%;
  1289. font-size: 20px;
  1290. }
  1291. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1292. padding: 0 25px;
  1293. border-left: 1px solid #cdd2dc;
  1294. background: #fafbfc;
  1295. }
  1296. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1297. width: 140px;
  1298. text-align: center;
  1299. background: #f0f2f6;
  1300. // border: 1px solid #cdd2dc;
  1301. }
  1302. .button-container {
  1303. display: flex;
  1304. flex-wrap: nowrap;
  1305. justify-content: space-between;
  1306. align-items: center;
  1307. background-color: #fff;
  1308. width: 100%;
  1309. height: 50px;
  1310. padding: 0 10px;
  1311. &>div {
  1312. margin-left: 10px;
  1313. display: flex;
  1314. flex-wrap: nowrap;
  1315. flex-direction: row;
  1316. &>span {
  1317. line-height: 50px;
  1318. }
  1319. }
  1320. /deep/.auditFlow-box {
  1321. position: unset;
  1322. margin-left: 10px;
  1323. &/deep/.auditFlow-icon {
  1324. width: auto;
  1325. padding-right: 30px;
  1326. }
  1327. &/deep/.auditFlow-main {
  1328. position: absolute;
  1329. }
  1330. }
  1331. }
  1332. .box-app {
  1333. display: inline-block;
  1334. margin-left: 30px;
  1335. line-height: 50px;
  1336. }
  1337. /deep/.el-dialog {
  1338. .el-form-item {
  1339. margin-bottom: 0 !important;
  1340. .el-input--medium {
  1341. textarea {
  1342. min-height: 100px !important;
  1343. }
  1344. }
  1345. }
  1346. }
  1347. .collapse-bottom {
  1348. margin-bottom: 20px;
  1349. }
  1350. .input-main .textarea .el-textarea__inner {
  1351. width: 100%;
  1352. z-index: 1;
  1353. }
  1354. .bg-left {
  1355. padding-left: 30px;
  1356. }
  1357. .bg-right {
  1358. padding: 10px;
  1359. text-align: right;
  1360. }
  1361. .bg-bottom {
  1362. margin: 6px 0px;
  1363. }
  1364. .wenzi {
  1365. width: 70%;
  1366. margin: 0 auto;
  1367. }
  1368. .wenzi h3 {
  1369. display: inline-block;
  1370. left: 30px;
  1371. }
  1372. .wenzi p {
  1373. display: inline-block;
  1374. }
  1375. .center {
  1376. width: 70%;
  1377. margin: 0 auto;
  1378. }
  1379. .el-form-item {
  1380. width: 50%;
  1381. }
  1382. .el-form-item__label {
  1383. text-align: center;
  1384. }
  1385. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  1386. /* height: 82px;*/
  1387. /*}*/
  1388. // 控制select为只读的时候显示样式
  1389. .hide-sel {
  1390. .el-input__inner {
  1391. border: 0px;
  1392. }
  1393. .el-icon-arrow-up {
  1394. display: none;
  1395. }
  1396. .el-textarea__inner {
  1397. background-color: #fff !important;
  1398. border: 0;
  1399. }
  1400. .el-date-editor {
  1401. i {
  1402. display: none;
  1403. }
  1404. }
  1405. .is-disabled {
  1406. .el-input__inner:hover {
  1407. background-color: #fff !important;
  1408. border: 0;
  1409. }
  1410. color: #606266;
  1411. .el-input__inner {
  1412. background-color: #fff !important;
  1413. border: 0;
  1414. color: #606266;
  1415. }
  1416. .el-textarea__inner {
  1417. background-color: #fff !important;
  1418. border: 0;
  1419. color: #606266;
  1420. }
  1421. }
  1422. }
  1423. // 控制select为只读的时候显示样式
  1424. /deep/.ws-class-table-col {
  1425. height: auto;
  1426. padding: 0px 2px;
  1427. /deep/.el-input__inner {
  1428. padding: 0px 2px;
  1429. }
  1430. }
  1431. /deep/.is-disabled {
  1432. .el-input__prefix,
  1433. .el-input__suffix {
  1434. display: none;
  1435. }
  1436. .el-input__inner {
  1437. background-color: #fff;
  1438. border-color: #fff !important;
  1439. color: #000 !important;
  1440. font-size: 14px;
  1441. cursor: text;
  1442. padding: 0 !important;
  1443. }
  1444. }
  1445. .winseaview-view {
  1446. padding: 0 0 20px;
  1447. }
  1448. .container {
  1449. overflow: scroll;
  1450. height: 93vh;
  1451. }
  1452. //*号
  1453. .unchangeable {
  1454. position: absolute;
  1455. width: 9px;
  1456. height: 22px;
  1457. font-size: 16px;
  1458. font-family: PingFangSC-Medium, PingFang SC;
  1459. font-weight: 500;
  1460. color: #ff2727;
  1461. line-height: 22px;
  1462. display: inline-block;
  1463. right: 14px;
  1464. }
  1465. /deep/.el-input,
  1466. /deep/.el-date-editor {
  1467. font-size: 13px;
  1468. }
  1469. /deep/.el-textarea {
  1470. width: 101%;
  1471. margin: 0px;
  1472. }
  1473. /deep/el-date-editor--date {
  1474. width: 200px;
  1475. }
  1476. .unchanged {
  1477. position: absolute;
  1478. left: 37px;
  1479. width: 102px;
  1480. height: 14px;
  1481. font-size: 14px;
  1482. font-weight: 400;
  1483. color: #afb5cb;
  1484. line-height: 14px;
  1485. }
  1486. /deep/.el-input--small .el-input__inner {
  1487. height: 32px;
  1488. line-height: 32px;
  1489. }
  1490. /deep/.el-form-item.is-success .el-input__inner,
  1491. /deep/.el-cascader .el-input .el-input__inner,
  1492. /deep/.el-textarea__inner {
  1493. color: #8890b1;
  1494. }
  1495. .addressUrls {
  1496. width: 100%;
  1497. display: flex;
  1498. margin-top: 10px;
  1499. }
  1500. .addressUrls-item {
  1501. position: relative;
  1502. display: flex;
  1503. }
  1504. .icon-guanbi {
  1505. position: absolute;
  1506. right: 8px;
  1507. }
  1508. .addressUrl {
  1509. margin: 0px 10px;
  1510. border-radius: 3px;
  1511. }
  1512. //上传文件成功标识
  1513. /deep/.el-upload-list__item-status-label {
  1514. position: absolute;
  1515. right: 22px;
  1516. top: -1px;
  1517. line-height: inherit;
  1518. display: none;
  1519. }
  1520. .map {
  1521. position: fixed;
  1522. top: 0;
  1523. bottom: 0;
  1524. left: 0;
  1525. right: 0;
  1526. margin: auto;
  1527. width: 850px;
  1528. height: 400px;
  1529. background: gainsboro;
  1530. border-radius: 20px;
  1531. padding: 10px;
  1532. box-sizing: border-box;
  1533. z-index: 99;
  1534. }
  1535. .amap-container {
  1536. width: 100% !important;
  1537. }
  1538. .address-btn {
  1539. width: 100%;
  1540. text-align: left;
  1541. color:#000;
  1542. border:1px solid #ccc;
  1543. }
  1544. </style>