futuresSalesContractEdit.vue 54 KB

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