addSaleOrderSteelSendCarrier.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. <template>
  2. <div class="addSaleOrderSend">
  3. <page-title>新增销售订单钢材派车</page-title>
  4. <!-- 派车表格 -->
  5. <div class="selectionTable from">
  6. <el-table
  7. :data="selectionList"
  8. border
  9. style="width: 100%"
  10. highlight-current-row
  11. :span-method="cellMerge"
  12. >
  13. <el-table-column
  14. v-for="(item, i) in tableTop"
  15. :key="i"
  16. :prop="item.prop"
  17. :label="item.label"
  18. :width="item.width"
  19. align="center"
  20. show-overflow-tooltip
  21. >
  22. <template slot="scope" v-if="item.label !== '车牌号'">
  23. <span>{{ item.label }}</span>
  24. </template>
  25. <template slot="scope" v-if="item.label !== '承运商'">
  26. <span>{{ item.label }}</span>
  27. </template>
  28. <template slot="scope" v-if="item.label !== '件数'">
  29. <span>{{ item.label }}</span>
  30. </template>
  31. <template slot="scope" v-if="item.label !== '运输线路'">
  32. <span>{{ item.label }}</span>
  33. </template>
  34. <template slot="scope" v-if="item.label !== '运输单价'">
  35. <span>{{ item.label }}</span>
  36. </template>
  37. <template slot="scope" v-if="item.label !== '截止日期'">
  38. <span>{{ item.label }}</span>
  39. </template>
  40. <template slot="scope" v-if="item.label !== '收货客户'">
  41. <span>{{ item.label }}</span>
  42. </template>
  43. <template slot="scope" v-if="item.label !== '收货客户电话号码'">
  44. <span>{{ item.label }}</span>
  45. </template>
  46. <!-- 插入输入框 -->
  47. <template slot-scope="scope">
  48. <template v-if="item.slot">
  49. <!-- 车牌号 -->
  50. <template v-if="item.prop == 'capacityNumber'">
  51. <el-autocomplete
  52. class="inline-input"
  53. v-model="scope.row.capacityNumber"
  54. :fetch-suggestions="querySearch"
  55. placeholder="(必填)"
  56. :trigger-on-focus="false"
  57. @select="handleSelect"
  58. @blur="checkRelationship(scope.$index)"
  59. @change="batchUpdateValue(scope.row,scope.$index)"
  60. ></el-autocomplete>
  61. </template>
  62. <!-- 承运商 -->
  63. <template v-if="item.prop == 'carrierName'">
  64. <el-select v-model="scope.row.carrierName" placeholder="请选择"
  65. @change="batchUpdateValue(scope.row,scope.$index)"
  66. disabled>
  67. <el-option
  68. v-for="item in carrierNameOptions[scope.$index]"
  69. :key="item.value"
  70. :label="item.label"
  71. :value="item.value">
  72. </el-option>
  73. </el-select>
  74. </template>
  75. <!-- 物资件数 -->
  76. <template v-if="item.prop == 'orderPlanWeight'">
  77. <el-input
  78. class="textinput"
  79. @input="onInput"
  80. placeholder="(必填)"
  81. v-model.number="scope.row.orderPlanWeight"
  82. disabled
  83. ></el-input>
  84. </template>
  85. <!-- 物资重量 -->
  86. <template v-if="item.prop == 'materialWeight'">
  87. <el-input
  88. class="textinput"
  89. v-model.number="scope.row.materialWeight"
  90. disabled
  91. ></el-input>
  92. </template>
  93. <!-- 运输单价id -->
  94. <template v-if="item.prop == 'priceValue'" >
  95. <el-input
  96. v-model="scope.row.priceValue"
  97. disabled
  98. >
  99. </el-input>
  100. </template>
  101. <!-- 截止日期 -->
  102. <template v-if="item.prop == 'saleDateOfReceipt'">
  103. <el-date-picker
  104. class="textinput3"
  105. type="date"
  106. v-model.number="scope.row.saleDateOfReceipt"
  107. style="width:135px"
  108. disabled
  109. ></el-date-picker>
  110. </template>
  111. <!-- 收货客户 -->
  112. <template v-if="item.prop == 'saleOrderConsignee'">
  113. <el-input
  114. class="textinput4"
  115. placeholder="(非必填)"
  116. v-model.number="scope.row.saleOrderConsignee"
  117. disabled
  118. ></el-input>
  119. </template>
  120. <!-- 收货客户电话号码 -->
  121. <template v-if="item.prop == 'saleOrderConsigneeTel'">
  122. <el-input
  123. class="textinput5"
  124. placeholder="(非必填)"
  125. v-model.number="scope.row.saleOrderConsigneeTel"
  126. @input="onInput"
  127. disabled
  128. ></el-input>
  129. </template>
  130. </template>
  131. <template v-else>
  132. <span>{{ scope.row[item.prop] }}</span>
  133. </template>
  134. </template>
  135. </el-table-column>
  136. <!-- 操作列 -->
  137. <!-- <el-table-column fixed="right" label="操作" width="100">
  138. </el-table-column> -->
  139. </el-table>
  140. </div>
  141. <div class="button_box">
  142. <el-button @click="cancel">取消</el-button>
  143. <el-button type="primary" @click="makeSure">确定</el-button>
  144. </div>
  145. </div>
  146. </template>
  147. <script>
  148. import PageTitle from "@/components/Page/Title";
  149. import { getCookie } from "@/utils/util.js";
  150. import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
  151. export default {
  152. components: { PageTitle },
  153. data() {
  154. return {
  155. //存放每一行记录的合并数
  156. spanArr: [],
  157. //pos是spanArr的索引
  158. pos:0,
  159. //加载
  160. selectLineLoading:false,
  161. //承运商下拉框中的值
  162. carrierNameOptions:[],
  163. //当前车序号物资
  164. selectionList:[],
  165. tableTop: [
  166. {
  167. prop: "truckNo",
  168. label: "车序号",
  169. width: "50",
  170. },
  171. {
  172. prop: "capacityNumber",
  173. label: "车牌号",
  174. width: "130",
  175. slot: true,
  176. },
  177. {
  178. prop: "carrierName",
  179. label: "承运商",
  180. width: "240",
  181. slot: true,
  182. },
  183. {
  184. prop: "materialName",
  185. label: "物资名称",
  186. width: "140",
  187. },
  188. {
  189. prop: "Specification",
  190. label: "规格型号",
  191. width: "140",
  192. },
  193. {
  194. prop: "orderPlanWeight",
  195. label: "件数",
  196. width: "80",
  197. slot: true,
  198. },
  199. {
  200. prop: "materialWeight",
  201. label: "重量",
  202. width: "80",
  203. slot: true,
  204. },
  205. {
  206. prop: "lineName",
  207. label: "厂内运输线路",
  208. width: "220",
  209. },
  210. {
  211. prop: "saleDateOfReceipt",
  212. label: "截止日期",
  213. width: "150",
  214. slot: true,
  215. },
  216. {
  217. prop: "saleShipperAddressName",
  218. label: "收货地址",
  219. width: "300",
  220. },
  221. {
  222. prop: "priceValue",
  223. label: "运输单价",
  224. width: "80",
  225. slot: true,
  226. },
  227. {
  228. prop: "saleOrderConsignee",
  229. label: "收货客户",
  230. width: "150",
  231. slot: true,
  232. },
  233. {
  234. prop: "saleOrderConsigneeTel",
  235. label: "收货客户电话号码",
  236. slot: true,
  237. width: "150",
  238. },
  239. {
  240. prop: "materialCode",
  241. label: "物资编码",
  242. width: "140",
  243. },
  244. ],
  245. };
  246. },
  247. created(){
  248. this.getValue();
  249. },
  250. methods: {
  251. getValue(){
  252. this.axios
  253. .post("/api/v1/ams/getTruckNoAndMaterialList?saleOrderId=" + this.$route.params.saleOrderId)
  254. .then((res)=>{
  255. if(res.data.data.length==0){
  256. this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
  257. confirmButtonText: "确定",
  258. cancelButtonText: "取消",
  259. type: "warning",
  260. center: true,
  261. })
  262. .then(() => {
  263. this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
  264. })
  265. .catch(() => {
  266. this.$message({ type: "info", message: "取消!",});
  267. });
  268. }
  269. //赋值派车表格
  270. res.data.data.forEach((e,i) => {
  271. if(e.saleOrderConsignee=="null"){
  272. e.saleOrderConsignee = null
  273. }
  274. if(e.saleOrderConsigneeTel=="null"){
  275. e.saleOrderConsigneeTel = null
  276. }
  277. var priceValueFirst = 0;
  278. var priceIdFirst = 0;
  279. e.carrierAndPriceList.forEach((a)=>{
  280. if(a.id == e.carrierId){
  281. priceValueFirst = a.priceValue;
  282. priceIdFirst = a.priceId;
  283. }
  284. })
  285. //带承运商初始化派车表格
  286. var addmap = {
  287. truckNo: e.truckNo,
  288. saleOrderMaterialId: e.saleOrderMaterialId,
  289. capacityNumber: null,
  290. carrierName: e.carrierId,
  291. carrierId: e.carrierId,
  292. materialId: e.materialId,
  293. materialName: e.materialName,
  294. Specification: e.materialModelSpecification,
  295. materialCode: e.materialCode,
  296. orderPlanWeight: e.materialNumber,
  297. materialWeight: e.materialWeight,
  298. lineName:null,
  299. lineId:null,
  300. saleShipperAddressId: e.placeId,
  301. saleShipperAddressName:e.place,
  302. saleDateOfReceipt: e.receiptDate,
  303. saleOrderConsignee: e.saleOrderConsignee,
  304. saleOrderConsigneeTel: e.saleOrderConsigneeTel,
  305. priceValue: priceValueFirst,
  306. priceId: priceIdFirst
  307. };
  308. this.selectionList.push(addmap);
  309. //填充承运商下拉框
  310. this.carrierNameOptions.push(e.carrierAndPriceList);
  311. //调用记录每一行的合并数的方法
  312. this.getSpanArr(this.selectionList);
  313. //初始化每个车的线路
  314. this.initializeLine();
  315. });
  316. });
  317. },
  318. onInput(val){
  319. if(!isNumber(val)){
  320. this.$message.warning('重量/电话号码请输入数字')
  321. }
  322. },
  323. //校验是否为车牌
  324. isVehicleNumber(vehicleNumber) {
  325. var result = false;
  326. if(vehicleNumber!=null){
  327. if (vehicleNumber.length == 7) {
  328. var express =
  329. /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
  330. result = express.test(vehicleNumber);
  331. }
  332. }
  333. return result;
  334. },
  335. //绑定车牌号和承运商的关系
  336. bindRelationship(mapValue){
  337. let RmsCapacity = {
  338. capacityTypeId: 1,
  339. capacityNumber: mapValue.capacityNumber,
  340. capacityCorlor: "黄",
  341. capacityOwneris: "否",
  342. capacityVip: "否",
  343. capacityBlacklist: "否",
  344. remark: null,
  345. carrierId: mapValue.carrierId,
  346. state: mapValue.carrierName,
  347. };
  348. this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
  349. confirmButtonText: "确定",
  350. cancelButtonText: "取消",
  351. type: "warning",
  352. })
  353. .then(() => {
  354. this.axios
  355. .post("/api/v1/rms/insertCapacity", RmsCapacity)
  356. .then((res) => {
  357. console.log("res",res)
  358. if (res.data.data == 0) {
  359. this.$message.success("该车牌号与承运商绑定关系成功!");
  360. }
  361. });
  362. })
  363. .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
  364. },
  365. //失焦事件后确定车牌号与承运商是否有绑定关系
  366. checkRelationship(index){
  367. if(this.selectionList[index].carrierId!=null){
  368. //暂存车牌号
  369. var capacityNumber1;
  370. if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
  371. let mapValue = {
  372. capacityNumber:this.selectionList[index].capacityNumber,
  373. carrierId:this.selectionList[index].carrierId,
  374. carrierName:this.selectionList[index].carrierName
  375. }
  376. this.axios
  377. .post("/api/v1/uc/isInCapacityCarrier", mapValue)
  378. .then((res)=>{
  379. if(res.data.code=="201"){
  380. capacityNumber1 = res.data.data;
  381. if(capacityNumber1==null){
  382. this.selectionList[index].capacityNumber = null;
  383. this.$message.error("该车牌号未注册,请先前往注册!");
  384. }else{
  385. this.bindRelationship(mapValue);
  386. }
  387. }
  388. });
  389. }
  390. }
  391. },
  392. //车牌号弹出层
  393. handleSelect(item) {
  394. console.log("item")
  395. // let mapValue = {
  396. // capacityNumber:item.capacityNumber,
  397. // carrierId:this.receiveCarrierId,
  398. // carrierName:this.receiveCarrierName
  399. // }
  400. // this.axios
  401. // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
  402. // .then((res)=>{
  403. // if(res.data.code=="201"){
  404. // this.bindRelationship(mapValue);
  405. // }
  406. // });
  407. },
  408. //以下是车牌号边输边查搜索
  409. querySearch(queryString, cb){
  410. this.axios
  411. .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
  412. .then((res) => {
  413. if (res.data.code == "200") {
  414. var restaurants = res.data.data;
  415. var results = queryString
  416. ? restaurants.filter(this.createFilter(queryString))
  417. : restaurants;
  418. // 调用 callback 返回建议列表的数据
  419. cb(results);
  420. }
  421. });
  422. },
  423. createFilter(queryString) {
  424. return (restaurants) => {
  425. return (
  426. restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
  427. -1
  428. );
  429. };
  430. },
  431. //以上是车牌号边输边查搜索
  432. //点击确定按钮的事件
  433. makeSure(){
  434. //是否可发送请求
  435. var canSend = 1;
  436. this.selectionList.forEach((e)=>{
  437. if(e.carrierName==null){
  438. canSend = 0;
  439. }
  440. if(isIntegerNumber(e.carrierName)){
  441. e.carrierId = e.carrierName;
  442. }
  443. });
  444. if(canSend==0){
  445. //还有车序号未授权承运商
  446. this.$message.warning('还有车序号未授权承运商!')
  447. }else{
  448. this.$confirm("是否确定进行钢材派单!", "提示", {
  449. confirmButtonText: "确定",
  450. cancelButtonText: "取消",
  451. type: "warning",
  452. center: true,
  453. })
  454. .then(() => {
  455. var mapList = [];
  456. for(var i=0;i<this.spanArr.length;i++){
  457. if(this.spanArr[i]>0&&this.selectionList[i].capacityNumber){
  458. var mapItem = {
  459. //车牌号
  460. capacityNumber : null,
  461. //车序号主键
  462. saleOrderMaterialId : 0,
  463. //承运商Id
  464. carrierId : 0,
  465. //线路Id
  466. lineId : 0,
  467. //运输单价Id
  468. priceId : 0
  469. }
  470. mapItem.capacityNumber = this.selectionList[i].capacityNumber,
  471. mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
  472. mapItem.carrierId = this.selectionList[i].carrierId,
  473. mapItem.lineId = this.selectionList[i].lineId,
  474. mapItem.priceId = this.selectionList[i].priceId
  475. mapList.push(mapItem);
  476. }
  477. }
  478. this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
  479. .then((res)=>{
  480. if(res.data.code == '200'){
  481. this.cancel();
  482. }
  483. this.$message.success('派单成功!')
  484. });
  485. })
  486. .catch(() => {
  487. this.$message({ type: "info", message: "取消!",});
  488. });
  489. }
  490. },
  491. //点击取消按钮的事件
  492. cancel(){
  493. this.$router.push('/saleOrderSteelCarrier')
  494. },
  495. //批量修改内层值
  496. batchUpdateValue(row,index){
  497. for(var i=index;i<this.spanArr[index]+index;i++){
  498. this.selectionList[i].capacityNumber=row.capacityNumber;
  499. }
  500. },
  501. //初始化线路
  502. initializeLine(){
  503. for(var i=0;i<this.spanArr.length;i++){
  504. if(this.spanArr[i]==1){
  505. for(var j=i;j<this.spanArr[i]+i;j++){
  506. this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
  507. this.selectionList[j].lineId = 110001;
  508. }
  509. }
  510. if(this.spanArr[i]==2){
  511. for(var j=i;j<this.spanArr[i]+i;j++){
  512. this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
  513. this.selectionList[j].lineId = 110002;
  514. }
  515. }
  516. if(this.spanArr[i]==3){
  517. for(var j=i;j<this.spanArr[i]+i;j++){
  518. this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  519. this.selectionList[j].lineId = 110003;
  520. }
  521. }
  522. if(this.spanArr[i]==4){
  523. for(var j=i;j<this.spanArr[i]+i;j++){
  524. this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  525. this.selectionList[j].lineId = 110004;
  526. }
  527. }
  528. if(this.spanArr[i]==5){
  529. for(var j=i;j<this.spanArr[i]+i;j++){
  530. this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  531. this.selectionList[j].lineId = 110005;
  532. }
  533. }
  534. if(this.spanArr[i]==6){
  535. for(var j=i;j<this.spanArr[i]+i;j++){
  536. this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  537. this.selectionList[j].lineId = 110006;
  538. }
  539. }
  540. if(this.spanArr[i]==7){
  541. for(var j=i;j<this.spanArr[i]+i;j++){
  542. this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  543. this.selectionList[j].lineId = 110007;
  544. }
  545. }
  546. if(this.spanArr[i]==8){
  547. for(var j=i;j<this.spanArr[i]+i;j++){
  548. this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  549. this.selectionList[j].lineId = 110008;
  550. }
  551. }
  552. if(this.spanArr[i]==9){
  553. for(var j=i;j<this.spanArr[i]+i;j++){
  554. this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  555. this.selectionList[j].lineId = 110009;
  556. }
  557. }
  558. if(this.spanArr[i]==10){
  559. for(var j=i;j<this.spanArr[i]+i;j++){
  560. this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  561. this.selectionList[j].lineId = 110010;
  562. }
  563. }
  564. }
  565. },
  566. //记录每一行的合并数
  567. getSpanArr(data) {
  568. //每次调用方法初始化
  569. this.spanArr = [];
  570. for (var i = 0; i < data.length; i++) {
  571. if (i === 0) {
  572. this.spanArr.push(1);
  573. this.pos = 0
  574. } else {
  575. // 判断当前元素与上一个元素是否相同
  576. if (data[i].truckNo === data[i - 1].truckNo) {
  577. this.spanArr[this.pos] += 1;
  578. this.spanArr.push(0);
  579. } else {
  580. this.spanArr.push(1);
  581. this.pos = i;
  582. }
  583. }
  584. }
  585. },
  586. //根据条件合并行
  587. cellMerge({ row, column, rowIndex, columnIndex }) {
  588. if (columnIndex === 0) {
  589. const _row = this.spanArr[rowIndex];
  590. const _col = _row > 0 ? 1 : 0;
  591. return {
  592. rowspan: _row,
  593. colspan: _col
  594. }
  595. }
  596. if (columnIndex === 1) {
  597. const _row = this.spanArr[rowIndex];
  598. const _col = _row > 0 ? 1 : 0;
  599. return {
  600. rowspan: _row,
  601. colspan: _col
  602. }
  603. }
  604. if (columnIndex === 2) {
  605. const _row = this.spanArr[rowIndex];
  606. const _col = _row > 0 ? 1 : 0;
  607. return {
  608. rowspan: _row,
  609. colspan: _col
  610. }
  611. }
  612. if (columnIndex === 7) {
  613. const _row = this.spanArr[rowIndex];
  614. const _col = _row > 0 ? 1 : 0;
  615. return {
  616. rowspan: _row,
  617. colspan: _col
  618. }
  619. }
  620. if (columnIndex === 8) {
  621. const _row = this.spanArr[rowIndex];
  622. const _col = _row > 0 ? 1 : 0;
  623. return {
  624. rowspan: _row,
  625. colspan: _col
  626. }
  627. }
  628. if (columnIndex === 9) {
  629. const _row = this.spanArr[rowIndex];
  630. const _col = _row > 0 ? 1 : 0;
  631. return {
  632. rowspan: _row,
  633. colspan: _col
  634. }
  635. }
  636. if (columnIndex === 10) {
  637. const _row = this.spanArr[rowIndex];
  638. const _col = _row > 0 ? 1 : 0;
  639. return {
  640. rowspan: _row,
  641. colspan: _col
  642. }
  643. }
  644. if (columnIndex === 11) {
  645. const _row = this.spanArr[rowIndex];
  646. const _col = _row > 0 ? 1 : 0;
  647. return {
  648. rowspan: _row,
  649. colspan: _col
  650. }
  651. }
  652. if (columnIndex === 12) {
  653. const _row = this.spanArr[rowIndex];
  654. const _col = _row > 0 ? 1 : 0;
  655. return {
  656. rowspan: _row,
  657. colspan: _col
  658. }
  659. }
  660. },
  661. },
  662. };
  663. </script>
  664. <style lang='scss'>
  665. .addSaleOrderSend {
  666. .from {
  667. margin-top: 20px;
  668. .line {
  669. display: flex;
  670. justify-content: center;
  671. align-items: center;
  672. .el-input {
  673. width: 350px;
  674. margin-left: 10px;
  675. margin-right: 10px;
  676. }
  677. }
  678. .sendCar {
  679. display: flex;
  680. justify-content: center;
  681. align-items: center;
  682. .el-input {
  683. width: 70px;
  684. margin-left: 10px;
  685. margin-right: 10px;
  686. margin-top: 10px;
  687. }
  688. }
  689. .vehicle {
  690. display: flex;
  691. justify-content: center;
  692. align-items: center;
  693. margin-top: 20px;
  694. .el-button {
  695. width: 250px;
  696. margin-left: 10px;
  697. margin-right: 10px;
  698. }
  699. .span {
  700. width: 70px;
  701. }
  702. }
  703. }
  704. .tablecls{
  705. margin-top: 20px;
  706. }
  707. .button_box{
  708. display: flex;
  709. justify-content: center;
  710. margin: 20px;
  711. .el-button{
  712. width: 100px;
  713. margin-left: 20px;
  714. }
  715. }
  716. }
  717. </style>