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