futuresSalesContractEdit.vue 54 KB

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