buyEdit.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. <template>
  2. <view class="center">
  3. <view class="area">
  4. <view class="c-row b-b">
  5. <text class="tit">名头</text>
  6. <view class="con-list">
  7. <text @click="navToDetailPage">{{deptList.procurementPlanNo}}</text>
  8. </view>
  9. </view>
  10. <view class="c-row b-b">
  11. <text class="tit">标题</text>
  12. <view class="con-list">
  13. <input maxlength='16' minlength='2' placeholder="请输入标题,不超过16个字" name="input" v-model="deptList.title"></input>
  14. </view>
  15. </view>
  16. <view class="c-row b-b">
  17. <text class="tit">货名</text>
  18. <view class="con-list">
  19. <input placeholder="请输入货名,如玉米" name="input" v-model="deptList.goodsName"></input>
  20. </view>
  21. </view>
  22. <view class="c-row b-b">
  23. <text class="tit">采购量(吨)</text>
  24. <view class="con-list">
  25. <input placeholder="请输入采购重量,如1000" name="input" v-model="deptList.plannedPurchaseVolume"></input>
  26. </view>
  27. </view>
  28. <view class="c-row b-b">
  29. <text class="tit">最小成交量(吨)</text>
  30. <view class="con-list">
  31. <input placeholder="请输入最小成交量" name="input" v-model="deptList.minimumVolume"></input>
  32. </view>
  33. </view>
  34. <view class="c-row b-b">
  35. <text class="tit">类型</text>
  36. <picker @change="typeChange" :value="typesIndex" :range="typesType" class="con-list"
  37. >
  38. <view class="picker" v-model="deptList.procurementPlanType">
  39. {{typesIndex>-1?typesType[typesIndex]:'请选择类型'}}
  40. </view>
  41. </picker>
  42. </view>
  43. <view class="c-row b-b">
  44. <text class="tit">价格类型</text>
  45. <view class="con-list">
  46. <!-- <input placeholder="请填写价格类型" name="input" v-model="deptList.priceType"></input> -->
  47. {{deptList.priceType}}
  48. </view>
  49. </view>
  50. <view class="c-row b-b" v-if="this.typesIndex != 1">
  51. <text class="tit">单价(元/吨)</text>
  52. <view class="con-list">
  53. <input placeholder="请填写单价" name="input" v-model="deptList.unitPrice"></input>
  54. </view>
  55. </view>
  56. <view class="c-row b-b" v-if="this.typesIndex == 1">
  57. <text class="tit">基差(元/吨)</text>
  58. <view class="con-list">
  59. <input placeholder="请输入基差" name="input" v-model="deptList.basisPrice"></input>
  60. </view>
  61. </view>
  62. <view class="c-row b-b">
  63. <text class="tit">产地</text>
  64. <view class="con-list">
  65. <view @click='regionchange1'>{{region1}}</view>
  66. <u-picker :params='params1' @confirm='regionpicker1' mode="region" v-model="show1" ></u-picker>
  67. </view>
  68. </view>
  69. <view class="c-row b-b">
  70. <text class="tit">收货地区</text>
  71. <view class="con-list">
  72. <view @click='regionchange'>{{region}}</view>
  73. <u-picker :params='params' @confirm='regionpicker' mode="region" v-model="show" ></u-picker>
  74. </view>
  75. </view>
  76. <view class="c-row b-b">
  77. <text class="tit">买方手机号</text>
  78. <view class="con-list">
  79. <input placeholder="请输入买方手机号" name="input" v-model="deptList.buyerPhone"></input>
  80. </view>
  81. </view>
  82. <view class="c-row ">
  83. <button @click='getcode' type="default">{{sendText}}</button>
  84. <view class="con-list">
  85. <input placeholder="请填写6位短信验证码" name="input" v-model="deptList.title1"></input>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="area">
  90. <view class="c-row b-b">
  91. <checkbox style='transform: scale(0.8);' :checked="checked" @click='checkedbox'></checkbox><text style="font-size: 14px; ">完善更多信息<text style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
  92. </view>
  93. <view v-if='checked' class="c-row b-b">
  94. <text class="tit">水分(%)<= </text>
  95. <view class="con-list">
  96. <input placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
  97. </view>
  98. </view>
  99. <view v-if='checked' class="c-row b-b">
  100. <text class="tit">容重(g/L)<= </text>
  101. <view class="con-list">
  102. <input placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
  103. </view>
  104. </view>
  105. <view v-if='checked' class="c-row b-b">
  106. <text class="tit">热损伤(%)<= </text>
  107. <view class="con-list">
  108. <input placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
  109. </view>
  110. </view>
  111. <view v-if='checked' class="c-row b-b">
  112. <text class="tit">杂质(%)<= </text>
  113. <view class="con-list">
  114. <input placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
  115. </view>
  116. </view>
  117. <view v-if='checked' class="c-row b-b">
  118. <text class="tit">霉变粒(%)<= </text>
  119. <view class="con-list">
  120. <input placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
  121. </view>
  122. </view>
  123. <view v-if='checked' class="c-row b-b">
  124. <text class="tit">不完整粒(%)<= </text>
  125. <view class="con-list">
  126. <input placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
  127. </view>
  128. </view>
  129. <view v-if='checked' class="c-row b-b">
  130. <text class="tit">蛋白(%)<= </text>
  131. <view class="con-list">
  132. <input placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
  133. </view>
  134. </view>
  135. <view v-if='checked' class="c-row b-b">
  136. <text class="tit">粒型 </text>
  137. <picker @change="liChange" :value="liIndex" :range="liType" class="con-list" v-model="deptList.grain">
  138. <view class="con-list">
  139. {{liIndex>-1?liType[liIndex]:'请选择粒型'}}
  140. </view>
  141. </picker>
  142. </view>
  143. <view v-if='checked' class="c-row b-b">
  144. <text class="tit">品级 </text>
  145. <picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list" v-model="deptList.grade">
  146. <view class="con-list">
  147. {{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
  148. </view>
  149. </picker>
  150. </view>
  151. <view v-if='checked' class="c-row b-b">
  152. <text class="tit">产出年份</text>
  153. <picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
  154. <view class="con-list">
  155. {{nianIndex>-1?nianType[nianIndex]:'请选择产出年份'}}
  156. </view>
  157. </picker>
  158. </view>
  159. <view v-if='checked' class="c-row b-b">
  160. <text class="tit">包装方式</text>
  161. <picker @change="baoChange" :value="baoIndex" :range="baoType" class="con-list">
  162. <view class="con-list">
  163. {{baoIndex>-1?baoType[baoIndex]:'请选择包装方式'}}
  164. </view>
  165. </picker>
  166. </view>
  167. <view v-if='checked&&baoIndex==2||!checked&&baoIndex==3' class="c-row b-b">
  168. <text class="tit">袋装备注</text>
  169. <view class="con-list">
  170. <input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
  171. </view>
  172. </view>
  173. <view v-if='checked' class="c-row b-b">
  174. <text class="tit">运费承担方</text>
  175. <picker @change="chengChange" :value="chengIndex" :range="chengType" class="con-list">
  176. <view class="con-list">
  177. {{chengIndex>-1?chengType[chengIndex]:'请选择运费承担方'}}
  178. </view>
  179. </picker>
  180. </view>
  181. </view>
  182. <button @click="commit()" class="btn">重新发布</button>
  183. </view>
  184. </template>
  185. <script>
  186. import {
  187. mapState
  188. } from 'vuex';
  189. export default {
  190. data() {
  191. return {
  192. types: '',
  193. goods:{},
  194. typesType: ["现货", "期货"],
  195. typesIndex: 0,
  196. deptList: {
  197. salePlanTypeKey:0,
  198. grainKey:0,
  199. gradeKey:0,
  200. packingTypeKey:0,
  201. freightPayerKey:-1,
  202. priceType: "定价采购",
  203. procurementPlanType:"现货",
  204. grain:"不限",
  205. grade:"不限",
  206. outputYear:"2020",
  207. packingType:"不限",
  208. freightPayer:"",
  209. },
  210. params:{
  211. province: true,
  212. city: true,
  213. area: true,
  214. },
  215. params1:{
  216. province: true,
  217. city: true,
  218. },
  219. checked:true,
  220. insertProcurementPlanInfo: {},
  221. liIndex: 0,
  222. liType: ['不限','塔粮', '筛粮', '中粒', '大粒'],
  223. pinIndex: -1,
  224. pinType: ['不限', '一等品', '二等品', '三等品', '等外'],
  225. nianIndex: 3,
  226. nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
  227. '2011'
  228. ],
  229. id:0,
  230. sendText:'获取验证码',
  231. show:false,
  232. show1:false,
  233. region:'请选择收货地区',
  234. region1:'请选择产地',
  235. baoIndex: 0,
  236. baoType: ['不限', '散装', '大袋', '小袋'],
  237. chengIndex: -1,
  238. chengType: ['可议', '买方承担', '卖方承担']
  239. }
  240. },
  241. computed: {
  242. ...mapState(['hasLogin','userInfo'])
  243. },
  244. onLoad(options){
  245. this.id=options.id
  246. if(options.customerName){
  247. this.deptList.procurementPlanNo = options.customerName
  248. }
  249. },
  250. onShow(){
  251. this.getList()
  252. var that=this
  253. this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
  254. if(res.data.code==200){
  255. if(res.data.data.customerTypeFlag==1){
  256. that.$set(this.deptList,'procurementPlanNo',res.data.data.customerName)
  257. }else{
  258. that.$set(this.deptList,'procurementPlanNo',res.data.data.compName)
  259. }
  260. this.goods=res.data.data
  261. }
  262. uni.hideLoading()
  263. })
  264. },
  265. methods: {
  266. getList(){
  267. this.$api.doRequest('get','/procurementPlanInfo/getProcurementPlan',{id:this.id}).then(res => {
  268. if(res.data.code==200){
  269. this.deptList = res.data.data
  270. let number = this.deptList.basisPrice
  271. this.deptList.basisPrice = Math.abs(number)
  272. this.region1=this.deptList.outputPrivate+'-'+this.deptList.outputCity
  273. this.region=this.deptList.receivePrivate+'-'+this.deptList.receiveCity+'-'+this.deptList.receiveArea
  274. if(this.deptList.procurementPlanTypeKey==2){
  275. this.typesIndex=1
  276. }else if(this.deptList.procurementPlanTypeKey==1){
  277. this.typesIndex=0
  278. }
  279. if(this.deptList.grainKey==1){
  280. this.liIndex=0
  281. }else if(this.deptList.grainKey==2){
  282. this.liIndex=1
  283. }else if(this.deptList.grainKey==3){
  284. this.liIndex=2
  285. }else if(this.deptList.grainKey==4){
  286. this.liIndex=3
  287. }else if(this.deptList.grainKey==5){
  288. this.liIndex=4
  289. }
  290. this.baoIndex=this.deptList.packingTypeKey
  291. this.pinIndex=this.deptList.gradeKey
  292. if(this.deptList.freightPayerKey==1){
  293. this.chengIndex=0
  294. }else if(this.deptList.freightPayerKey==2){
  295. this.chengIndex=1
  296. }else if(this.deptList.freightPayerKey==3){
  297. this.chengIndex=2
  298. }
  299. // let number = this.deptList.basisPrice
  300. // deptList.basisPrice
  301. }
  302. })
  303. .catch(res => {
  304. uni.showToast({
  305. title: res.errmsg,
  306. icon:'none',
  307. duration: 2000
  308. })
  309. });
  310. },
  311. getcode(){
  312. var that = this
  313. if(/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.deptList.buyerPhone)){
  314. this.$api.doRequest('get','/commonUser/sendVerifyCode',{phone:this.deptList.buyerPhone}).then(res => {
  315. if(res.data.code==200){
  316. that.sendDisabled = true
  317. let sec = 60
  318. let interval = setInterval(() => {
  319. sec--;
  320. that.sendText = sec + 's后重发'
  321. if (sec <= 0) {
  322. that.sendDisabled = false
  323. that.sendText = "获取验证码"
  324. clearInterval(interval)
  325. }
  326. }, 1000)
  327. }else{
  328. uni.showToast({
  329. title: res.data.message,
  330. icon:'none',
  331. duration: 2000
  332. })
  333. }
  334. })
  335. .catch(res => {
  336. uni.showToast({
  337. title: res.data.message,
  338. icon:'none',
  339. duration: 2000
  340. })
  341. });
  342. }else{
  343. uni.showToast({
  344. title: '请输入正确的手机号',
  345. icon:'none',
  346. duration: 2000
  347. })
  348. }
  349. },
  350. regionpicker(e){
  351. this.deptList.receivePrivate=e.province.label
  352. this.deptList.receiveCity=e.city.label
  353. this.deptList.receiveArea=e.area.label
  354. this.region=e.province.label+'-'+e.city.label+'-'+e.area.label
  355. },
  356. regionchange(){
  357. this.show=true
  358. },
  359. regionpicker1(e){
  360. this.deptList.outputPrivate=e.province.label
  361. this.deptList.outputCity=e.city.label
  362. this.region1=e.province.label+'-'+e.city.label
  363. },
  364. regionchange1(){
  365. this.show1=true
  366. },
  367. checkedbox(e){
  368. this.checked = !this.checked
  369. },
  370. typeChange(e) {
  371. this.typesIndex = e.detail.value
  372. if(e.detail.value==0){
  373. this.deptList.priceType = '定价采购'
  374. this.deptList.procurementPlanTypeKey =2
  375. }else{
  376. this.deptList.priceType = '期货盘面价+基差'
  377. this.deptList.procurementPlanTypeKey =1
  378. }
  379. this.deptList.procurementPlanType = this.typesType[this.typesIndex];
  380. },
  381. navToDetailPage() {
  382. // if (index == 1) {
  383. uni.navigateTo({
  384. url: `/pageD/myRelease/Identity_switching?id=`+this.id
  385. })
  386. },
  387. commit() {
  388. // if (!this.deptList.goodsName) {
  389. // this.$api.msg('货名1不能为空')
  390. // return
  391. // }
  392. if (!this.deptList.title) {
  393. this.$api.msg('标题不能为空')
  394. return
  395. }
  396. if (this.deptList.title.length>16||this.deptList.title.length<2) {
  397. this.$api.msg('标题输入错误')
  398. return
  399. }
  400. if (!this.deptList.goodsName) {
  401. this.$api.msg('货名不能为空')
  402. return
  403. }
  404. if (this.deptList.goodsName.length>6||this.deptList.goodsName.length<1) {
  405. this.$api.msg('货名输入错误')
  406. return
  407. }
  408. if (!this.deptList.plannedPurchaseVolume) {
  409. this.$api.msg('采购量不能为空')
  410. return
  411. }
  412. if (this.deptList.plannedPurchaseVolume>100000||this.deptList.plannedPurchaseVolume<1) {
  413. this.$api.msg('采购量输入错误')
  414. return
  415. }
  416. // var plannedPurchaseVolume = this.deptList.plannedPurchaseVolume.toString()
  417. if (this.deptList.plannedPurchaseVolume.toString().indexOf(".") != -1) {
  418. if(this.deptList.plannedPurchaseVolume.split('.')[1].length>2){
  419. this.$api.msg('采购量输入错误')
  420. return
  421. }
  422. }
  423. if (!this.deptList.minimumVolume) {
  424. this.$api.msg('最小成交量不能为空')
  425. return
  426. }
  427. if (this.deptList.minimumVolume>100000||this.deptList.minimumVolume<1) {
  428. this.$api.msg('最小成交量输入错误')
  429. return
  430. }
  431. if (this.deptList.minimumVolume.toString().indexOf('.')!=-1) {
  432. if(this.deptList.minimumVolume.split('.')[1].length>2){
  433. this.$api.msg('最小成交量输入错误')
  434. return
  435. }
  436. }
  437. if (!this.deptList.procurementPlanType) {
  438. this.$api.msg('类型不能为空')
  439. return
  440. }
  441. if (!this.deptList.priceType) {
  442. this.$api.msg('价格类型不能为空')
  443. return
  444. }
  445. if(this.deptList.procurementPlanType == '现货'){
  446. if (!this.deptList.unitPrice) {
  447. this.$api.msg('单价不能为空')
  448. return
  449. }
  450. if (this.deptList.unitPrice>100000||this.deptList.unitPrice<1) {
  451. this.$api.msg('单价输入错误')
  452. return
  453. }
  454. if (this.deptList.unitPrice.indexOf('.')!=-1) {
  455. if(this.deptList.unitPrice.split('.')[1].length>2){
  456. this.$api.msg('单价输入错误')
  457. return
  458. }
  459. }
  460. }else if(this.deptList.procurementPlanType == '期货'){
  461. if (!this.deptList.basisPrice) {
  462. this.$api.msg('基差不能为空')
  463. return
  464. }
  465. if (this.deptList.basisPrice>10000||this.deptList.basisPrice<1) {
  466. this.$api.msg('基差输入错误')
  467. return
  468. }
  469. if (this.deptList.basisPrice.toString().indexOf('.')!=-1) {
  470. if(this.deptList.basisPrice.toString().split('.')[1].length>2){
  471. this.$api.msg('基差输入错误')
  472. return
  473. }
  474. }
  475. }
  476. if (!this.deptList.buyerPhone) {
  477. this.$api.msg('买方手机号不能为空')
  478. return
  479. }
  480. if(this.checked == false){
  481. if (this.deptList.waterContent&&this.deptList.waterContent<1||
  482. this.deptList.waterContent&&this.deptList.waterContent>40) {
  483. this.$api.msg('水分输入错误')
  484. return
  485. }
  486. if (this.deptList.waterContent&&this.deptList.waterContent.indexOf('.')!=-1) {
  487. if(this.deptList.waterContent.split('.')[1].length>2){
  488. this.$api.msg('水分输入错误')
  489. return
  490. }
  491. }
  492. if (this.deptList.bulkDensity&&this.deptList.bulkDensity<500||
  493. this.deptList.bulkDensity&&this.deptList.bulkDensity>1000) {
  494. this.$api.msg('容重输入错误')
  495. return
  496. }
  497. if (this.deptList.jiaorenli&&this.deptList.jiaorenli<1||
  498. this.deptList.jiaorenli&&this.deptList.jiaorenli>40) {
  499. this.$api.msg('热损伤输入错误')
  500. return
  501. }
  502. if (this.deptList.jiaorenli&&this.deptList.jiaorenli.indexOf('.')!=-1) {
  503. if(this.deptList.jiaorenli.split('.')[1].length>2){
  504. this.$api.msg('热损伤输入错误')
  505. return
  506. }
  507. }
  508. if (this.deptList.impurity&&this.deptList.impurity<1||
  509. this.deptList.impurity&&this.deptList.impurity>40) {
  510. this.$api.msg('杂质输入错误')
  511. return
  512. }
  513. if (this.deptList.impurity&&this.deptList.impurity.indexOf('.')!=-1) {
  514. if(this.deptList.impurity.split('.')[1].length>2){
  515. this.$api.msg('杂质输入错误')
  516. return
  517. }
  518. }
  519. if (this.deptList.mildewGrain&&this.deptList.mildewGrain<1||
  520. this.deptList.mildewGrain&&this.deptList.mildewGrain>40) {
  521. this.$api.msg('霉变粒输入错误')
  522. return
  523. }
  524. if (this.deptList.mildewGrain&&this.deptList.mildewGrain.indexOf('.')!=-1) {
  525. if(this.deptList.mildewGrain.split('.')[1].length>2){
  526. this.$api.msg('霉变粒输入错误')
  527. return
  528. }
  529. }
  530. if (this.deptList.imperfectGrain&&this.deptList.imperfectGrain<1||
  531. this.deptList.imperfectGrain&&this.deptList.imperfectGrain>40) {
  532. this.$api.msg('不完整粒输入错误')
  533. return
  534. }
  535. if (this.deptList.imperfectGrain&&this.deptList.imperfectGrain.indexOf('.')!=-1) {
  536. if(this.deptList.imperfectGrain.split('.')[1].length>2){
  537. this.$api.msg('不完整粒输入错误')
  538. return
  539. }
  540. }
  541. if (this.deptList.protein && this.deptList.protein < 1 ||
  542. this.deptList.protein && this.deptList.protein > 80) {
  543. this.$api.msg('蛋白输入错误')
  544. return
  545. }
  546. if (this.deptList.protein && this.deptList.protein.indexOf('.')!=-1) {
  547. if(this.deptList.protein.split('.')[1].length>2){
  548. this.$api.msg('蛋白输入错误')
  549. return
  550. }
  551. }
  552. }
  553. this.insertProcurementPlanInfo = this.deptList
  554. this.insertProcurementPlanInfo.basisPrice=-this.insertProcurementPlanInfo.basisPrice
  555. this.insertProcurementPlanInfo.commonId = this.userInfo.id
  556. this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
  557. uni.showModal({
  558. content: '重新发布后交易信息将进入待审核状态,是否确定重新发布?',
  559. success: (res) => {
  560. if(res.confirm) {
  561. this.$api.doRequest('post', '/procurementPlanInfo/api/editProcurementPlan', this
  562. .insertProcurementPlanInfo).then(res => {
  563. if(res.data.code==200){
  564. uni.showToast({
  565. title: "发布成功",
  566. icon: 'none',
  567. })
  568. this.deptList={}
  569. uni.navigateTo({
  570. url: `/pages/release/release`
  571. })
  572. }else{
  573. uni.showToast({
  574. title: res.data.message,
  575. icon: 'none',
  576. duration: 2000
  577. })
  578. }
  579. })
  580. .catch(res => {
  581. uni.showToast({
  582. title: res.errmsg,
  583. icon: 'none',
  584. duration: 2000
  585. })
  586. });
  587. }
  588. }
  589. })
  590. },
  591. liChange(e) {
  592. this.liIndex = e.detail.value
  593. this.litypes = this.liType[this.liIndex];
  594. this.deptList.grainKey = e.detail.value+1
  595. this.deptList.grain = this.liType[this.liIndex]
  596. },
  597. pinChange(e) {
  598. this.pinIndex = e.detail.value
  599. this.pintypes = this.pinType[this.pinIndex];
  600. this.deptList.gradeKey = e.detail.value
  601. this.deptList.grade = this.pinType[this.pinIndex]
  602. },
  603. nianChange(e) {
  604. this.nianIndex = e.detail.value
  605. this.niantypes = this.nianType[this.nianIndex];
  606. this.deptList.outputYear = this.baoType[this.baoIndex]
  607. },
  608. baoChange(e) {
  609. this.baoIndex = e.detail.value
  610. this.baotypes = this.baoType[this.baoIndex];
  611. this.deptList.packingTypeKey = e.detail.value
  612. this.deptList.packingType = this.baoType[this.baoIndex];
  613. },
  614. chengChange(e) {
  615. this.chengIndex = e.detail.value
  616. this.chengtypes = this.chengType[this.chengIndex];
  617. this.deptList.freightPayerKey = e.detail.value+1
  618. this.deptList.freightPayer = this.chengType[this.chengIndex];
  619. }
  620. }
  621. }
  622. </script>
  623. <style>
  624. .center {
  625. padding: 10px 20px;
  626. background-color: #F5F6FA;
  627. }
  628. .c-row {
  629. display: -webkit-box;
  630. display: -webkit-flex;
  631. display: flex;
  632. -webkit-box-align: center;
  633. -webkit-align-items: center;
  634. align-items: center;
  635. padding: 20rpx 30rpx;
  636. position: relative;
  637. }
  638. .con-list {
  639. -webkit-box-flex: 1;
  640. -webkit-flex: 1;
  641. flex: 1;
  642. display: -webkit-box;
  643. display: -webkit-flex;
  644. display: flex;
  645. -webkit-box-orient: vertical;
  646. -webkit-box-direction: normal;
  647. -webkit-flex-direction: column;
  648. flex-direction: column;
  649. color: #303133;
  650. line-height: 40rpx;
  651. text-align: right;
  652. padding-right: 20rpx;
  653. font-size: 14px;
  654. }
  655. .area{
  656. background-color: #FFFFFF;
  657. border-radius: 20px;
  658. margin-top: 10px;
  659. }
  660. .btn{
  661. margin-top: 10px;
  662. border-radius: 20px;
  663. background-color: #22C572;
  664. color: #FFFFFF;
  665. }
  666. </style>