purchaseContractEdit.vue 51 KB

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