purchaseContractEdit.vue 50 KB

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