collectionContractEdit.vue 49 KB

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