addSaleOrderSteelSendCarrier.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  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. //带承运商初始化派车表格
  278. var addmap = {
  279. truckNo: e.truckNo,
  280. saleOrderMaterialId: e.saleOrderMaterialId,
  281. capacityNumber: null,
  282. carrierName: e.carrierName,
  283. carrierId: e.carrierId,
  284. materialId: e.materialId,
  285. materialName: e.materialName,
  286. Specification: e.materialModelSpecification,
  287. materialCode: e.materialCode,
  288. orderPlanWeight: e.materialNumber,
  289. materialWeight: e.materialWeight,
  290. lineName:null,
  291. lineId:null,
  292. saleShipperAddressId: e.placeId,
  293. saleShipperAddressName:e.place,
  294. saleDateOfReceipt: e.receiptDate,
  295. saleOrderConsignee: e.saleOrderConsignee,
  296. saleOrderConsigneeTel: e.saleOrderConsigneeTel
  297. };
  298. this.selectionList.push(addmap);
  299. //调用记录每一行的合并数的方法
  300. this.getSpanArr(this.selectionList);
  301. //初始化每个车的线路
  302. this.initializeLine();
  303. });
  304. });
  305. },
  306. onInput(val){
  307. if(!isNumber(val)){
  308. this.$message.warning('重量/电话号码请输入数字')
  309. }
  310. },
  311. //校验是否为车牌
  312. isVehicleNumber(vehicleNumber) {
  313. var result = false;
  314. if(vehicleNumber!=null){
  315. if (vehicleNumber.length == 7) {
  316. var express =
  317. /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
  318. result = express.test(vehicleNumber);
  319. }
  320. }
  321. return result;
  322. },
  323. //绑定车牌号和承运商的关系
  324. bindRelationship(mapValue){
  325. let RmsCapacity = {
  326. capacityTypeId: 1,
  327. capacityNumber: mapValue.capacityNumber,
  328. capacityCorlor: "黄",
  329. capacityOwneris: "否",
  330. capacityVip: "否",
  331. capacityBlacklist: "否",
  332. remark: null,
  333. carrierId: mapValue.carrierId,
  334. state: mapValue.carrierName,
  335. };
  336. this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
  337. confirmButtonText: "确定",
  338. cancelButtonText: "取消",
  339. type: "warning",
  340. })
  341. .then(() => {
  342. this.axios
  343. .post("/api/v1/rms/insertCapacity", RmsCapacity)
  344. .then((res) => {
  345. console.log("res",res)
  346. if (res.data.data == 0) {
  347. this.$message.success("该车牌号与承运商绑定关系成功!");
  348. }
  349. });
  350. })
  351. .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
  352. },
  353. //失焦事件后确定车牌号与承运商是否有绑定关系
  354. checkRelationship(index){
  355. if(this.selectionList[index].carrierId!=null){
  356. //暂存车牌号
  357. var capacityNumber1;
  358. if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
  359. let mapValue = {
  360. capacityNumber:this.selectionList[index].capacityNumber,
  361. carrierId:this.selectionList[index].carrierId,
  362. carrierName:this.selectionList[index].carrierName
  363. }
  364. this.axios
  365. .post("/api/v1/uc/isInCapacityCarrier", mapValue)
  366. .then((res)=>{
  367. if(res.data.code=="201"){
  368. capacityNumber1 = res.data.data;
  369. if(capacityNumber1==null){
  370. this.selectionList[index].capacityNumber = null;
  371. this.$message.error("该车牌号未注册,请先前往注册!");
  372. }else{
  373. this.bindRelationship(mapValue);
  374. }
  375. }
  376. });
  377. }
  378. }
  379. },
  380. //车牌号弹出层
  381. handleSelect(item) {
  382. console.log("item")
  383. // let mapValue = {
  384. // capacityNumber:item.capacityNumber,
  385. // carrierId:this.receiveCarrierId,
  386. // carrierName:this.receiveCarrierName
  387. // }
  388. // this.axios
  389. // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
  390. // .then((res)=>{
  391. // if(res.data.code=="201"){
  392. // this.bindRelationship(mapValue);
  393. // }
  394. // });
  395. },
  396. //以下是车牌号边输边查搜索
  397. querySearch(queryString, cb){
  398. this.axios
  399. .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
  400. .then((res) => {
  401. if (res.data.code == "200") {
  402. var restaurants = res.data.data;
  403. var results = queryString
  404. ? restaurants.filter(this.createFilter(queryString))
  405. : restaurants;
  406. // 调用 callback 返回建议列表的数据
  407. cb(results);
  408. }
  409. });
  410. },
  411. createFilter(queryString) {
  412. return (restaurants) => {
  413. return (
  414. restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
  415. -1
  416. );
  417. };
  418. },
  419. //以上是车牌号边输边查搜索
  420. //点击确定按钮的事件
  421. makeSure(){
  422. //是否可发送请求
  423. var canSend = 1;
  424. this.selectionList.forEach((e)=>{
  425. if(e.carrierName==null){
  426. canSend = 0;
  427. }
  428. if(isIntegerNumber(e.carrierName)){
  429. e.carrierId = e.carrierName;
  430. }
  431. });
  432. if(canSend==0){
  433. //还有车序号未授权承运商
  434. this.$message.warning('还有车序号未授权承运商!')
  435. }else{
  436. this.$confirm("是否确定进行钢材派单!", "提示", {
  437. confirmButtonText: "确定",
  438. cancelButtonText: "取消",
  439. type: "warning",
  440. center: true,
  441. })
  442. .then(() => {
  443. var mapList = [];
  444. for(var i=0;i<this.spanArr.length;i++){
  445. if(this.spanArr[i]>0&&this.selectionList[i].capacityNumber){
  446. var mapItem = {
  447. //车牌号
  448. capacityNumber : null,
  449. //车序号主键
  450. saleOrderMaterialId : 0,
  451. //承运商Id
  452. carrierId : 0,
  453. //线路Id
  454. lineId : 0,
  455. }
  456. mapItem.capacityNumber = this.selectionList[i].capacityNumber,
  457. mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
  458. mapItem.carrierId = this.selectionList[i].carrierId,
  459. mapItem.lineId = this.selectionList[i].lineId,
  460. mapList.push(mapItem);
  461. }
  462. }
  463. this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
  464. .then((res)=>{
  465. if(res.data.code == '200'){
  466. this.cancel();
  467. }
  468. this.$message.success('派单成功!')
  469. });
  470. })
  471. .catch(() => {
  472. this.$message({ type: "info", message: "取消!",});
  473. });
  474. }
  475. },
  476. //点击取消按钮的事件
  477. cancel(){
  478. this.$router.push('/saleOrderSteelCarrier')
  479. },
  480. //批量修改内层值
  481. batchUpdateValue(row,index){
  482. for(var i=index;i<this.spanArr[index]+index;i++){
  483. this.selectionList[i].capacityNumber=row.capacityNumber;
  484. }
  485. },
  486. //初始化线路
  487. initializeLine(){
  488. for(var i=0;i<this.spanArr.length;i++){
  489. if(this.spanArr[i]==1){
  490. for(var j=i;j<this.spanArr[i]+i;j++){
  491. this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
  492. this.selectionList[j].lineId = 110001;
  493. }
  494. }
  495. if(this.spanArr[i]==2){
  496. for(var j=i;j<this.spanArr[i]+i;j++){
  497. this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
  498. this.selectionList[j].lineId = 110002;
  499. }
  500. }
  501. if(this.spanArr[i]==3){
  502. for(var j=i;j<this.spanArr[i]+i;j++){
  503. this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  504. this.selectionList[j].lineId = 110003;
  505. }
  506. }
  507. if(this.spanArr[i]==4){
  508. for(var j=i;j<this.spanArr[i]+i;j++){
  509. this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  510. this.selectionList[j].lineId = 110004;
  511. }
  512. }
  513. if(this.spanArr[i]==5){
  514. for(var j=i;j<this.spanArr[i]+i;j++){
  515. this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  516. this.selectionList[j].lineId = 110005;
  517. }
  518. }
  519. if(this.spanArr[i]==6){
  520. for(var j=i;j<this.spanArr[i]+i;j++){
  521. this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  522. this.selectionList[j].lineId = 110006;
  523. }
  524. }
  525. if(this.spanArr[i]==7){
  526. for(var j=i;j<this.spanArr[i]+i;j++){
  527. this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  528. this.selectionList[j].lineId = 110007;
  529. }
  530. }
  531. if(this.spanArr[i]==8){
  532. for(var j=i;j<this.spanArr[i]+i;j++){
  533. this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  534. this.selectionList[j].lineId = 110008;
  535. }
  536. }
  537. if(this.spanArr[i]==9){
  538. for(var j=i;j<this.spanArr[i]+i;j++){
  539. this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  540. this.selectionList[j].lineId = 110009;
  541. }
  542. }
  543. if(this.spanArr[i]==10){
  544. for(var j=i;j<this.spanArr[i]+i;j++){
  545. this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
  546. this.selectionList[j].lineId = 110010;
  547. }
  548. }
  549. }
  550. },
  551. //记录每一行的合并数
  552. getSpanArr(data) {
  553. //每次调用方法初始化
  554. this.spanArr = [];
  555. for (var i = 0; i < data.length; i++) {
  556. if (i === 0) {
  557. this.spanArr.push(1);
  558. this.pos = 0
  559. } else {
  560. // 判断当前元素与上一个元素是否相同
  561. if (data[i].truckNo === data[i - 1].truckNo) {
  562. this.spanArr[this.pos] += 1;
  563. this.spanArr.push(0);
  564. } else {
  565. this.spanArr.push(1);
  566. this.pos = i;
  567. }
  568. }
  569. }
  570. },
  571. //根据条件合并行
  572. cellMerge({ row, column, rowIndex, columnIndex }) {
  573. if (columnIndex === 0) {
  574. const _row = this.spanArr[rowIndex];
  575. const _col = _row > 0 ? 1 : 0;
  576. return {
  577. rowspan: _row,
  578. colspan: _col
  579. }
  580. }
  581. if (columnIndex === 1) {
  582. const _row = this.spanArr[rowIndex];
  583. const _col = _row > 0 ? 1 : 0;
  584. return {
  585. rowspan: _row,
  586. colspan: _col
  587. }
  588. }
  589. if (columnIndex === 2) {
  590. const _row = this.spanArr[rowIndex];
  591. const _col = _row > 0 ? 1 : 0;
  592. return {
  593. rowspan: _row,
  594. colspan: _col
  595. }
  596. }
  597. if (columnIndex === 7) {
  598. const _row = this.spanArr[rowIndex];
  599. const _col = _row > 0 ? 1 : 0;
  600. return {
  601. rowspan: _row,
  602. colspan: _col
  603. }
  604. }
  605. if (columnIndex === 8) {
  606. const _row = this.spanArr[rowIndex];
  607. const _col = _row > 0 ? 1 : 0;
  608. return {
  609. rowspan: _row,
  610. colspan: _col
  611. }
  612. }
  613. if (columnIndex === 9) {
  614. const _row = this.spanArr[rowIndex];
  615. const _col = _row > 0 ? 1 : 0;
  616. return {
  617. rowspan: _row,
  618. colspan: _col
  619. }
  620. }
  621. if (columnIndex === 10) {
  622. const _row = this.spanArr[rowIndex];
  623. const _col = _row > 0 ? 1 : 0;
  624. return {
  625. rowspan: _row,
  626. colspan: _col
  627. }
  628. }
  629. if (columnIndex === 11) {
  630. const _row = this.spanArr[rowIndex];
  631. const _col = _row > 0 ? 1 : 0;
  632. return {
  633. rowspan: _row,
  634. colspan: _col
  635. }
  636. }
  637. if (columnIndex === 12) {
  638. const _row = this.spanArr[rowIndex];
  639. const _col = _row > 0 ? 1 : 0;
  640. return {
  641. rowspan: _row,
  642. colspan: _col
  643. }
  644. }
  645. },
  646. },
  647. };
  648. </script>
  649. <style lang='scss'>
  650. .addSaleOrderSend {
  651. .from {
  652. margin-top: 20px;
  653. .line {
  654. display: flex;
  655. justify-content: center;
  656. align-items: center;
  657. .el-input {
  658. width: 350px;
  659. margin-left: 10px;
  660. margin-right: 10px;
  661. }
  662. }
  663. .sendCar {
  664. display: flex;
  665. justify-content: center;
  666. align-items: center;
  667. .el-input {
  668. width: 70px;
  669. margin-left: 10px;
  670. margin-right: 10px;
  671. margin-top: 10px;
  672. }
  673. }
  674. .vehicle {
  675. display: flex;
  676. justify-content: center;
  677. align-items: center;
  678. margin-top: 20px;
  679. .el-button {
  680. width: 250px;
  681. margin-left: 10px;
  682. margin-right: 10px;
  683. }
  684. .span {
  685. width: 70px;
  686. }
  687. }
  688. }
  689. .tablecls{
  690. margin-top: 20px;
  691. }
  692. .button_box{
  693. display: flex;
  694. justify-content: center;
  695. margin: 20px;
  696. .el-button{
  697. width: 100px;
  698. margin-left: 20px;
  699. }
  700. }
  701. }
  702. </style>