addSaleOrderSteelSend.vue 24 KB

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