futuresSalesContractEdit.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711
  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 clearable
  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" filterable clearable>
  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="true" :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 (!this.deptBudgetList.seller) {
  820. this.$message({
  821. message: '请输入卖方名称!',
  822. type: 'warning',
  823. })
  824. return
  825. }
  826. if (this.deptBudgetList.seller.length > 30) {
  827. this.$message({
  828. message: '卖方名称长度不符合要求,请输入30个字符之内!',
  829. type: 'warning',
  830. })
  831. return
  832. }
  833. if (!this.deptBudgetList.sellerPhone) {
  834. this.$message({
  835. message: '请输入卖方电话!',
  836. type: 'warning',
  837. })
  838. return
  839. }
  840. if (isNaN(this.deptBudgetList.sellerPhone)) {
  841. this.$message({
  842. message: '输入卖方电话有误!',
  843. type: 'warning',
  844. })
  845. return
  846. }
  847. if (!this.deptBudgetList.acceptanceMethod) {
  848. this.$message({
  849. message: '请选择验收方式',
  850. type: 'warning',
  851. })
  852. return
  853. }
  854. if (!this.deptBudgetList.weight) {
  855. this.$message({
  856. message: '请输入交易数量!',
  857. type: 'warning',
  858. })
  859. return
  860. }
  861. if (
  862. isNaN(this.deptBudgetList.weight) ||
  863. (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
  864. String(this.deptBudgetList.weight).length -
  865. (String(this.deptBudgetList.weight).indexOf('.') + 1) >
  866. 3) ||
  867. this.deptBudgetList.weight < 0 ||
  868. this.deptBudgetList.weight > 200000
  869. ) {
  870. this.$message({
  871. message: '输入交易数量有误!',
  872. type: 'warning',
  873. })
  874. return
  875. }
  876. if (!this.deptBudgetList.measurementStandard) {
  877. this.$message({
  878. message: '请输入计量标准!',
  879. type: 'warning',
  880. })
  881. return
  882. }
  883. if (
  884. this.deptBudgetList.measurementStandard.length < 1 ||
  885. this.deptBudgetList.measurementStandard.length > 20
  886. ) {
  887. this.$message({
  888. message: '计量标准长度不符合要求,请输入1到20个字符之内!',
  889. type: 'warning',
  890. })
  891. return
  892. }
  893. if (!String(this.deptBudgetList.basisPrice)) {
  894. this.$message({
  895. message: '请输入基差!',
  896. type: 'warning',
  897. })
  898. return
  899. }
  900. if (
  901. isNaN(this.deptBudgetList.basisPrice) ||
  902. (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
  903. String(this.deptBudgetList.basisPrice).length -
  904. (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
  905. 3) ||
  906. this.deptBudgetList.basisPrice < 0 ||
  907. this.deptBudgetList.basisPrice > 10000
  908. ) {
  909. this.$message({
  910. message: '基差输入错误!',
  911. type: 'warning',
  912. })
  913. return
  914. }
  915. if (!this.deptBudgetList.receiveWarehouse) {
  916. this.$message({
  917. message: '请选择出货库!',
  918. type: 'warning',
  919. })
  920. return
  921. }
  922. if (!this.deptBudgetList.transactionsPlace) {
  923. this.$message({
  924. message: '请输入交易所!',
  925. type: 'warning',
  926. })
  927. return
  928. }
  929. if (
  930. this.deptBudgetList.transactionsPlace.length < 2 ||
  931. this.deptBudgetList.transactionsPlace.length > 15
  932. ) {
  933. this.$message({
  934. message: '交易所长度不符合要求,请输入2到15个字符之内!',
  935. type: 'warning',
  936. })
  937. return
  938. }
  939. if (!this.newSelectedOptions1) {
  940. this.$message({
  941. message: '请选择交货所在地区!',
  942. type: 'warning',
  943. })
  944. return
  945. }
  946. if (!this.deptBudgetList.contractNumber) {
  947. this.$message({
  948. message: '请输入合约号!',
  949. type: 'warning',
  950. })
  951. return
  952. }
  953. if (
  954. this.deptBudgetList.contractNumber.length < 2 ||
  955. this.deptBudgetList.contractNumber.length > 15
  956. ) {
  957. this.$message({
  958. message: '合约号长度不符合要求,请输入2到15个字符之内!',
  959. type: 'warning',
  960. })
  961. return
  962. }
  963. if (!this.deptBudgetList.placeDelivery) {
  964. this.$message({
  965. message: '请输入交货详细地址!',
  966. type: 'warning',
  967. })
  968. return
  969. }
  970. if (!this.deptBudgetList.pointPrice) {
  971. this.$message({
  972. message: '请输入点价!',
  973. type: 'warning',
  974. })
  975. return
  976. }
  977. if (
  978. isNaN(this.deptBudgetList.pointPrice) ||
  979. (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
  980. String(this.deptBudgetList.pointPrice).length -
  981. (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
  982. 3) ||
  983. this.deptBudgetList.pointPrice < 0 ||
  984. this.deptBudgetList.pointPrice > 100000
  985. ) {
  986. this.$message({
  987. message: '输入点价有误!',
  988. type: 'warning',
  989. })
  990. return
  991. }
  992. if (!this.deptBudgetList.signingDate) {
  993. this.$message({
  994. message: '请选择签订日期',
  995. type: 'warning',
  996. })
  997. return
  998. }
  999. if (!this.deptBudgetList.pointPriceDate) {
  1000. this.$message({
  1001. message: '请选择点价日期',
  1002. type: 'warning',
  1003. })
  1004. return
  1005. }
  1006. if (!this.deptBudgetList.deliveryDateStart) {
  1007. this.$message({
  1008. message: '请选择交货日期(起)',
  1009. type: 'warning',
  1010. })
  1011. return
  1012. }
  1013. if (!this.deptBudgetList.deliveryDateEnd) {
  1014. this.$message({
  1015. message: '请选择交货日期(止)',
  1016. type: 'warning',
  1017. })
  1018. return
  1019. }
  1020. //时间
  1021. if (
  1022. new Date(this.deptBudgetList.deliveryDateStart).getTime() >
  1023. new Date(this.deptBudgetList.deliveryDateEnd).getTime()
  1024. ) {
  1025. this.$message({
  1026. message: '交货日期(止)选择错误',
  1027. type: 'warning',
  1028. })
  1029. return
  1030. }
  1031. //货物信息
  1032. if (!this.newSelectedOptions) {
  1033. this.$message({
  1034. message: '请选择产地!',
  1035. type: 'warning',
  1036. })
  1037. return
  1038. }
  1039. if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
  1040. this.$message({
  1041. message: '请选择货名',
  1042. type: 'warning',
  1043. })
  1044. return
  1045. }
  1046. if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
  1047. this.$message({
  1048. message: '请输入水分',
  1049. type: 'warning',
  1050. })
  1051. return
  1052. }
  1053. if (
  1054. this.deptBudgetList.contractGoodsInfo.waterContent &&
  1055. String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
  1056. String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
  1057. (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
  1058. 2 || this.deptBudgetList.contractGoodsInfo.waterContent > 40 || this.deptBudgetList.contractGoodsInfo
  1059. .waterContent < 0
  1060. ) {
  1061. this.$message({
  1062. message: '水分输入错误',
  1063. type: 'warning',
  1064. })
  1065. return
  1066. }
  1067. if (!this.deptBudgetList.contractGoodsInfo.grade) {
  1068. this.$message({
  1069. message: '请选择品级',
  1070. type: 'warning',
  1071. })
  1072. return
  1073. }
  1074. if (!this.deptBudgetList.contractGoodsInfo.transgene) {
  1075. this.$message({
  1076. message: '请选择转基因',
  1077. type: 'warning',
  1078. })
  1079. return
  1080. }
  1081. if (!this.deptBudgetList.contractGoodsInfo.impurity) {
  1082. this.$message({
  1083. message: '请输入杂质',
  1084. type: 'warning',
  1085. })
  1086. return
  1087. }
  1088. if (
  1089. this.deptBudgetList.contractGoodsInfo.impurity &&
  1090. String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
  1091. String(this.deptBudgetList.contractGoodsInfo.impurity).length -
  1092. (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
  1093. 2 || this.deptBudgetList.contractGoodsInfo.impurity > 40 || this.deptBudgetList.contractGoodsInfo.impurity < 0
  1094. ) {
  1095. this.$message({
  1096. message: '杂质输入错误',
  1097. type: 'warning',
  1098. })
  1099. return
  1100. }
  1101. if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
  1102. this.$message({
  1103. message: '请输入容重',
  1104. type: 'warning',
  1105. })
  1106. return
  1107. }
  1108. if (
  1109. (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
  1110. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
  1111. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
  1112. (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
  1113. 2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo
  1114. .bulkDensity < 0
  1115. ) {
  1116. this.$message({
  1117. message: '容重输入错误',
  1118. type: 'warning',
  1119. })
  1120. return
  1121. }
  1122. if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
  1123. this.$message({
  1124. message: '请输入霉变粒',
  1125. type: 'warning',
  1126. })
  1127. return
  1128. }
  1129. if (
  1130. !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
  1131. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1132. '.'
  1133. ) != -1 &&
  1134. String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
  1135. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1136. '.'
  1137. ) +
  1138. 1) >
  1139. 2 || this.deptBudgetList.contractGoodsInfo.mildewGrain > 40 || this.deptBudgetList.contractGoodsInfo
  1140. .mildewGrain < 0)
  1141. ) {
  1142. this.$message({
  1143. message: '霉变粒输入错误',
  1144. type: 'warning',
  1145. })
  1146. return
  1147. }
  1148. if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
  1149. this.$message({
  1150. message: '请输入热损伤',
  1151. type: 'warning',
  1152. })
  1153. return
  1154. }
  1155. if (
  1156. !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
  1157. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
  1158. -1 &&
  1159. String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
  1160. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
  1161. '.'
  1162. ) +
  1163. 1) >
  1164. 2 || this.deptBudgetList.contractGoodsInfo.jiaorenli > 40 || this.deptBudgetList.contractGoodsInfo
  1165. .jiaorenli < 0)
  1166. ) {
  1167. this.$message({
  1168. message: '热损伤输入错误',
  1169. type: 'warning',
  1170. })
  1171. return
  1172. }
  1173. if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
  1174. this.$message({
  1175. message: '请输入不完善粒',
  1176. type: 'warning',
  1177. })
  1178. return
  1179. }
  1180. if (
  1181. !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
  1182. (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
  1183. '.'
  1184. ) != -1 &&
  1185. String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
  1186. (String(
  1187. this.deptBudgetList.contractGoodsInfo.imperfectGrain
  1188. ).indexOf('.') +
  1189. 1) >
  1190. 2 || this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 || this.deptBudgetList.contractGoodsInfo
  1191. .imperfectGrain < 0)
  1192. ) {
  1193. this.$message({
  1194. message: '不完善粒输入错误',
  1195. type: 'warning',
  1196. })
  1197. return
  1198. }
  1199. if (!this.deptBudgetList.contractGoodsInfo.protein) {
  1200. this.$message({
  1201. message: '请输入蛋白',
  1202. type: 'warning',
  1203. })
  1204. return
  1205. }
  1206. if (
  1207. !this.deptBudgetList.contractGoodsInfo.protein ||
  1208. (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
  1209. '.'
  1210. ) != -1 &&
  1211. String(this.deptBudgetList.contractGoodsInfo.protein).length -
  1212. (String(
  1213. this.deptBudgetList.contractGoodsInfo.protein
  1214. ).indexOf('.') +
  1215. 1) >
  1216. 2 || this.deptBudgetList.contractGoodsInfo.protein > 70 || this.deptBudgetList.contractGoodsInfo.protein < 0
  1217. )
  1218. ) {
  1219. this.$message({
  1220. message: '蛋白输入错误',
  1221. type: 'warning',
  1222. })
  1223. return
  1224. }
  1225. if (
  1226. this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
  1227. this.deptBudgetList.contractProcessInfo.goodsNameKey < 0 ||
  1228. (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
  1229. '.'
  1230. ) != -1 &&
  1231. String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
  1232. (String(
  1233. this.deptBudgetList.contractProcessInfo.goodsNameKey
  1234. ).indexOf('.') +
  1235. 1) >
  1236. 2)
  1237. ) {
  1238. this.$message({
  1239. message: '合同收入金额输入错误',
  1240. type: 'warning',
  1241. })
  1242. return
  1243. }
  1244. if (
  1245. this.deptBudgetList.contractProcessInfo.waterContent > 10000000 ||
  1246. this.deptBudgetList.contractProcessInfo.waterContent < 0 ||
  1247. (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
  1248. '.'
  1249. ) != -1 &&
  1250. String(this.deptBudgetList.contractProcessInfo.waterContent).length -
  1251. (String(
  1252. this.deptBudgetList.contractProcessInfo.waterContent
  1253. ).indexOf('.') +
  1254. 1) >
  1255. 2)
  1256. ) {
  1257. this.$message({
  1258. message: '费用金额输入错误',
  1259. type: 'warning',
  1260. })
  1261. return
  1262. }
  1263. if (
  1264. this.deptBudgetList.contractProcessInfo.goodsName > 1000000000 ||
  1265. this.deptBudgetList.contractProcessInfo.goodsName < 0 ||
  1266. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1267. '.'
  1268. ) != -1 &&
  1269. String(this.deptBudgetList.contractProcessInfo.goodsName).length -
  1270. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1271. '.'
  1272. ) +
  1273. 1) >
  1274. 2)
  1275. ) {
  1276. this.$message({
  1277. message: '已开发票金额输入错误',
  1278. type: 'warning',
  1279. })
  1280. return
  1281. }
  1282. if (
  1283. this.deptBudgetList.contractProcessInfo.impurity > 1000000000 ||
  1284. this.deptBudgetList.contractProcessInfo.impurity < 0 ||
  1285. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1286. '.'
  1287. ) != -1 &&
  1288. String(this.deptBudgetList.contractProcessInfo.impurity).length -
  1289. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1290. '.'
  1291. ) +
  1292. 1) >
  1293. 2)
  1294. ) {
  1295. this.$message({
  1296. message: '未开发票金额输入错误',
  1297. type: 'warning',
  1298. })
  1299. return
  1300. }
  1301. if (
  1302. (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) ||
  1303. (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
  1304. (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
  1305. '.'
  1306. ) != -1 &&
  1307. String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
  1308. (String(
  1309. this.deptBudgetList.contractProcessInfo.mildewGrain
  1310. ).indexOf('.') +
  1311. 1) >
  1312. 2)
  1313. ) {
  1314. this.$message({
  1315. message: '未回款金额输入错误',
  1316. type: 'warning',
  1317. })
  1318. return
  1319. }
  1320. this.$confirm(`确定提交本次修改?`, {
  1321. cancelButtonText: '取消',
  1322. confirmButtonText: '确定',
  1323. type: 'warning'
  1324. })
  1325. .then(() => {
  1326. this.$refs.deptBudgetList.validate((valid) => {
  1327. if (valid) {
  1328. this.deptBudgetList.compId = this.compId
  1329. this.deptBudgetList.contractType = 1
  1330. this.deptBudgetList.goodsType = 2
  1331. editInfo(this.deptBudgetList)
  1332. .toPromise()
  1333. .then((response) => {
  1334. this.$message.success('编辑成功')
  1335. this.$router.push({
  1336. path: 'futuresSalesContract'
  1337. })
  1338. })
  1339. } else {
  1340. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1341. return false
  1342. }
  1343. })
  1344. })
  1345. },
  1346. },
  1347. }
  1348. </script>
  1349. <style lang="scss" scoped>
  1350. .el-form {
  1351. padding: 0 15%;
  1352. }
  1353. /deep/.ws-info-table .el-form-item {
  1354. border-right: 1px solid #cdd2dc;
  1355. border-bottom: 1px solid #cdd2dc;
  1356. }
  1357. .readonly {
  1358. position: relative;
  1359. }
  1360. .readonly:after {
  1361. content: '*';
  1362. color: #ff2727;
  1363. position: absolute;
  1364. right: 8px;
  1365. z-index: 10;
  1366. top: 21%;
  1367. font-size: 20px;
  1368. }
  1369. .title {
  1370. position: relative;
  1371. }
  1372. .title::before {
  1373. content: '';
  1374. display: inline-block;
  1375. width: 5px;
  1376. height: 30px;
  1377. background: #5473e8;
  1378. position: absolute;
  1379. left: 0;
  1380. }
  1381. .el-button--primary {
  1382. background-color: #5878e8;
  1383. border-color: #5878e8;
  1384. }
  1385. .el-col {
  1386. background: #f6f7fc;
  1387. }
  1388. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1389. padding: 0 25px;
  1390. border-left: 1px solid #cdd2dc;
  1391. background: #fafbfc;
  1392. color: #8890B1;
  1393. }
  1394. /deep/.el-form-item.is-success .el-input__inner,
  1395. /deep/.el-cascader .el-input .el-input__inner,
  1396. /deep/.el-textarea__inner {
  1397. color: #8890B1;
  1398. }
  1399. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1400. width: 140px;
  1401. text-align: center;
  1402. background: #f0f2f6;
  1403. // border: 1px solid #cdd2dc;
  1404. }
  1405. .button-container {
  1406. display: flex;
  1407. flex-wrap: nowrap;
  1408. justify-content: space-between;
  1409. align-items: center;
  1410. background-color: #fff;
  1411. width: 100%;
  1412. height: 50px;
  1413. padding: 0 10px;
  1414. &>div {
  1415. margin-left: 10px;
  1416. display: flex;
  1417. flex-wrap: nowrap;
  1418. flex-direction: row;
  1419. &>span {
  1420. line-height: 50px;
  1421. }
  1422. }
  1423. /deep/.auditFlow-box {
  1424. position: unset;
  1425. margin-left: 10px;
  1426. &/deep/.auditFlow-icon {
  1427. width: auto;
  1428. padding-right: 30px;
  1429. }
  1430. &/deep/.auditFlow-main {
  1431. position: absolute;
  1432. }
  1433. }
  1434. }
  1435. .box-app {
  1436. display: inline-block;
  1437. float: left;
  1438. margin-left: 30px;
  1439. line-height: 50px;
  1440. }
  1441. /deep/.el-dialog {
  1442. .el-form-item {
  1443. margin-bottom: 0 !important;
  1444. .el-input--medium {
  1445. textarea {
  1446. min-height: 100px !important;
  1447. }
  1448. }
  1449. }
  1450. }
  1451. .collapse-bottom {
  1452. margin-bottom: 20px;
  1453. }
  1454. .input-main .textarea .el-textarea__inner {
  1455. width: 100%;
  1456. z-index: 1;
  1457. }
  1458. .bg-left {
  1459. padding-left: 30px;
  1460. }
  1461. .bg-right {
  1462. padding-right: 10px;
  1463. text-align: right;
  1464. }
  1465. .bg-bottom {
  1466. margin: 15px 0px;
  1467. }
  1468. .wenzi {
  1469. width: 900px;
  1470. margin: 0 auto;
  1471. }
  1472. .wenzi h3 {
  1473. display: inline-block;
  1474. left: 10px;
  1475. }
  1476. .wenzi p {
  1477. display: inline-block;
  1478. }
  1479. .center {
  1480. width: 900px;
  1481. margin: 0 auto;
  1482. }
  1483. .el-form-item {
  1484. width: 50%;
  1485. }
  1486. .el-form-item__label {
  1487. text-align: center;
  1488. }
  1489. .ce {
  1490. width: 900px;
  1491. margin: 0 auto;
  1492. }
  1493. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  1494. /* height: 82px;*/
  1495. /*}*/
  1496. // 控制select为只读的时候显示样式
  1497. .hide-sel {
  1498. .el-input__inner {
  1499. border: 0px;
  1500. }
  1501. .el-icon-arrow-up {
  1502. display: none;
  1503. }
  1504. .el-textarea__inner {
  1505. background-color: #fff !important;
  1506. border: 0;
  1507. }
  1508. .el-date-editor {
  1509. i {
  1510. display: none;
  1511. }
  1512. }
  1513. .is-disabled {
  1514. .el-input__inner:hover {
  1515. background-color: #fff !important;
  1516. border: 0;
  1517. }
  1518. color: #606266;
  1519. .el-input__inner {
  1520. background-color: #fff !important;
  1521. border: 0;
  1522. color: #606266;
  1523. }
  1524. .el-textarea__inner {
  1525. background-color: #fff !important;
  1526. border: 0;
  1527. color: #606266;
  1528. }
  1529. }
  1530. }
  1531. // 控制select为只读的时候显示样式
  1532. /deep/.ws-class-table-col {
  1533. height: auto;
  1534. padding: 0px 2px;
  1535. /deep/.el-input__inner {
  1536. padding: 0px 2px;
  1537. }
  1538. }
  1539. /deep/.is-disabled {
  1540. .el-input__prefix,
  1541. .el-input__suffix {
  1542. display: none;
  1543. }
  1544. .el-input__inner {
  1545. background-color: #fff;
  1546. border-color: #fff !important;
  1547. color: #000 !important;
  1548. font-size: 14px;
  1549. cursor: text;
  1550. padding: 0 !important;
  1551. }
  1552. }
  1553. .winseaview-view {
  1554. padding: 0 0 20px;
  1555. }
  1556. .container {
  1557. overflow: scroll;
  1558. height: 93vh;
  1559. }
  1560. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1561. width: 130px;
  1562. }
  1563. .el-textarea {
  1564. width: 101%;
  1565. }
  1566. /deep/.iconclose:before {
  1567. display: none;
  1568. }
  1569. /deep/.winsea-card .card__header {
  1570. font-size: 14px;
  1571. color: #409eff;
  1572. padding: 0 0 20px 10px;
  1573. position: relative;
  1574. display: none;
  1575. }
  1576. .addressUrls {
  1577. width: 100%;
  1578. display: flex;
  1579. margin-top: 10px;
  1580. }
  1581. .addressUrls-item {
  1582. position: relative;
  1583. display: flex;
  1584. }
  1585. .icon-guanbi {
  1586. position: absolute;
  1587. right: 8px;
  1588. }
  1589. .addressUrl {
  1590. margin: 0px 10px;
  1591. border-radius: 3px;
  1592. }
  1593. .queren {
  1594. margin-left: 100%;
  1595. margin-top: -60px;
  1596. }
  1597. //上传文件成功标识
  1598. /deep/.el-upload-list__item-status-label {
  1599. position: absolute;
  1600. right: 22px;
  1601. top: -1px;
  1602. line-height: inherit;
  1603. display: none;
  1604. }
  1605. .map {
  1606. position: fixed;
  1607. top: 0;
  1608. bottom: 0;
  1609. left: 0;
  1610. right: 0;
  1611. margin: auto;
  1612. width: 850px;
  1613. height: 400px;
  1614. background: gainsboro;
  1615. border-radius: 20px;
  1616. padding: 10px;
  1617. box-sizing: border-box;
  1618. z-index: 99;
  1619. }
  1620. .amap-container {
  1621. width: 100% !important;
  1622. }
  1623. .address-btn {
  1624. width: 100%;
  1625. text-align: left;
  1626. color:#000;
  1627. border:1px solid #ccc;
  1628. }
  1629. </style>