123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740 |
- <!-- 内转钢材到异地库派单界面 -->
- <template>
- <div class="purchasFuelNewMonitor">
- <div class="tableTop">
- <el-form :inline="true" style="margin-top: 5px">
- <el-form-item>
- <el-select
- v-model="screen"
- placeholder="请选择需筛选的内容"
- clearable
- @change="changeScreen"
- style="width: 150px"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-input
- style="width: 200px"
- v-model="input"
- placeholder="请输入查询条件"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item>
- <label class="el-form-item__label" style="width: auto"
- >订单时间:</label
- >
- <el-date-picker
- v-model="startTime"
- type="datetime"
- placeholder="选择日期时间"
- style="width: 200px"
- >
- </el-date-picker>
- <span>至</span>
- <el-date-picker
- v-model="endTime"
- type="datetime"
- placeholder="选择日期时间"
- style="width: 200px"
- >
- </el-date-picker>
- <el-button type="primary" class="btn" @click="onclick">
- <i class="el-icon-search"></i>
- </el-button>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="exportAllReportToExcel"
- ><i class="el-icon-download"></i>Excel</el-button
- >
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="refresh">
- <i class="el-icon-refresh"></i>
- </el-button>
- </el-form-item>
- <el-form-item>
- <span style="margin-left: 1rem">合计车数:</span>
- <el-input
- v-model="totalCapacity"
- :disabled="true"
- style="width: 100px"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <span style="margin-left: 1rem">合计件数:</span>
- <el-input
- v-model="totalNumber"
- :disabled="true"
- style="width: 100px"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="showDialog"
- >多拼派车</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- <div class="table">
- <el-table
- :data="tableData"
- :span-method="objectSpanMethod"
- ref="tableRef"
- border
- stripe
- style="width: 100%; margin-top: 20px"
- max-height="800px"
- @cell-click="cellClik"
- :row-style="{ height: '30px' }"
- :cell-style="{ fontWeight: '700' }"
- >
- <el-table-column
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column
- width="50"
- label="序号"
- align="center"
- fixed="left"
- :resizable="false"
- >
- <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
- </el-table-column>
- <el-table-column
- prop="consigneeName"
- label="收货客户"
- :width="flexColumnWidth('consigneeName', tableData, 'max')"
- align="center"
- fixed
- >
- <template slot-scope="scope">
- <el-autocomplete
- class="inline-input"
- v-model="scope.row.consigneeName"
- :fetch-suggestions="querySearchConsignee"
- placeholder="请输入收货客户名称"
- @select="handleSelectConsignee(scope.row, scope.$index)"
- style="width:300px"
- >
- </el-autocomplete>
- </template>
- </el-table-column>
- <el-table-column
- prop="carrierName"
- label="承运商"
- align="center"
- width="250px"
- fixed
- >
- <template slot-scope="scope">
- <el-autocomplete
- style="width: 120px"
- v-model="scope.row.carrierName"
- :fetch-suggestions="querySearchCarrier"
- placeholder="请输入承运商"
- @select="handleSelectCarrier(scope.row, scope.$index)"
- :disabled="scope.row.isCarrierShow != 1"
- >
- </el-autocomplete>
- <el-button
- @click="updateTruckCarrier(scope.row)"
- type="primary"
- v-if="scope.row.isCarrierShow == 1"
- >提交</el-button
- >
- </template>
- </el-table-column>
-
- <el-table-column
- prop="sendStationName"
- column-key="sendStationName"
- label="发站"
- align="center"
- width="100px"
- fixed
- >
- <!-- 选择发站 -->
- <template slot-scope="scope">
- <el-select filterable v-model="scope.row.sendStationId"
- @change="updateSendStation($event,scope.row)">
- <el-option v-for="item in sendStations" :value="item.sendStationId" :key="item.sendStationId" :label="item.sendStation"></el-option>
- </el-select>
- <!-- <el-button
- @click="updateStation(scope.row)"
- type="primary"
- v-if="scope.row.isSendStationName == 1"
- >提交</el-button
- > -->
- </template>
- </el-table-column>
- <!-- <el-table-column
- prop="lineName"
- column-key="lineName"
- label="路线"
- align="center"
- width="250px"
- fixed
- > -->
- <!-- 选择路线 -->
- <!-- <template slot-scope="scope">
- <el-autocomplete
- style="width: 120px"
- v-model="scope.row.lineName"
- :fetch-suggestions="querySearchLineName"
- placeholder="请选择路线"
- @select="handleSelectLine(scope.row, scope.$index)"
- :disabled="scope.row.isLineName != 1"
- >
- </el-autocomplete>
- <el-button
- @click="updateLine(scope.row)"
- type="primary"
- v-if="scope.row.isLineName == 1"
- >提交</el-button
- >
- </template>
- </el-table-column> -->
- <el-table-column
- prop="capacityNo"
- column-key="capacityNo"
- label="车牌号"
- align="center"
- width="250px"
- fixed
- >
- <template slot-scope="scope">
- <el-autocomplete
- style="width: 120px"
- v-model="scope.row.capacityNo"
- :fetch-suggestions="querySearch"
- placeholder="请输入车牌号"
- @select="handleSelect(scope.row, scope.$index)"
- :disabled="scope.row.isCapacityShow != 1"
- ></el-autocomplete>
- <el-button
- @click="updateCapacity(scope.row)"
- type="primary"
- v-if="scope.row.isCapacityShow == 1"
- >提交</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- prop="materialName"
- label="物资名称"
- align="center"
- width="150px"
- >
- </el-table-column>
- <el-table-column prop="materialSpe" label="物资规格" align="center">
- </el-table-column>
- <el-table-column
- prop="materialNum"
- label="物资件数"
- align="center"
- width="150px"
- >
- <template slot-scope="scope">
- <button
- type="primary"
- @click="scope.row.materialNum--"
- v-if="scope.row.isNumShow == 1"
- style="height: 40px"
- >
- -
- </button>
- <input
- v-model="scope.row.materialNum"
- disabled
- style="
- width: 40px;
- height: 40px;
- font-size: 16px;
- line-height: 40px;
- text-align: center;
- "
- />
- <el-button
- type="primary"
- @click="updateBillOrder(scope.row)"
- v-if="scope.row.isNumShow == 1"
- >提交</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- prop="addressPlace"
- label="收货地址"
- :width="flexColumnWidth('addressPlace', tableData, 'max')"
- >
- <template slot-scope="scope">
- <el-input
- style="width: 280px"
- v-model="scope.row.addressPlace"
- placeholder="请输入收货地址"
- :disabled="scope.row.isAddressShow != 1"
- ></el-input>
- <el-button
- @click="updateAddress(scope.row)"
- type="primary"
- v-if="scope.row.isAddressShow == 1"
- >选择</el-button
- >
- </template>
- </el-table-column>
- <el-table-column prop="orderStatus" label="运单状态" align="center">
- </el-table-column>
- <el-table-column prop="grossWeight" label="毛重"> </el-table-column>
- <el-table-column prop="grossWeightTime" label="毛重时间" width="130px">
- </el-table-column>
- <el-table-column prop="tareWeight" label="皮重"> </el-table-column>
- <el-table-column prop="tareWeightTime" label="皮重时间" width="130px">
- </el-table-column>
- <el-table-column prop="netWeight" label="净重"> </el-table-column>
- <el-table-column prop="entryGateTime" label="进厂时间" width="130px">
- </el-table-column>
- <el-table-column prop="loadTime" label="装货时间" width="130px">
- </el-table-column>
- <el-table-column prop="outGateTime" label="出厂时间" width="130px">
- </el-table-column>
- <el-table-column
- prop="arrivalAddress"
- label="抵达地址"
- :width="flexColumnWidth('arrivalAddress', tableData, 'max')"
- >
- </el-table-column>
- <el-table-column
- prop="receiptAddress"
- label="签收地址"
- :width="flexColumnWidth('receiptAddress', tableData, 'max')"
- >
- </el-table-column>
- <el-table-column
- prop="orderNo"
- label="运输订单号"
- width="180px"
- align="center"
- >
- </el-table-column>
- <el-table-column
- prop="capacityTel"
- label="司机电话"
- width="250px"
- align="center"
- >
- <template slot-scope="scope">
- <el-input
- style="width: 120px"
- v-model="scope.row.capacityTel"
- placeholder="请输入电话号码"
- :disabled="scope.row.isTelShow != 1"
- ></el-input>
- <el-button
- @click="updateDriverTel(scope.row)"
- type="primary"
- v-if="scope.row.isTelShow == 1"
- >提交</el-button
- >
- </template>
- </el-table-column>
- <el-table-column prop="saler" label="业务员" align="center">
- </el-table-column>
- <el-table-column
- prop="shipperName"
- label="发货单位"
- width="170px"
- align="center"
- >
- </el-table-column>
- <el-table-column prop="truckNo" label="车序号"> </el-table-column>
- <el-table-column prop="consigneeTel" label="收货客户电话" width="120px">
- </el-table-column>
- <el-table-column prop="isSelfMention" label="是否自提" align="center">
- </el-table-column>
- <el-table-column
- prop="saleOrderNo"
- label="销售订单号"
- width="200px"
- align="center"
- >
- </el-table-column>
- <el-table-column
- prop="saleOrderStatus"
- label="销售订单状态"
- width="100px"
- >
- </el-table-column>
- <el-table-column
- label="操作"
- fixed="right"
- width="120px"
- align="center"
- >
- <template slot-scope="scope">
- <el-button
- type="text"
- size="small"
- @click="closeEasEntryId(scope.row)"
- v-if="scope.row.deletedStatus == null"
- >关闭分录</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- fixed="right"
- width="120px"
- align="center"
- >
- <template slot-scope="scope">
- <el-button
- type="text"
- size="small"
- @click="deleteEasEntryId(scope.row)"
- v-if="
- scope.row.carStatus == 4 ||
- scope.row.carStatus == 5 ||
- scope.row.carStatus == null
- "
- >关闭车辆</el-button
- >
- </template>
- </el-table-column>
- <!-- <el-table-column
- label="操作"
- fixed="right"
- width="120px"
- align="center"
- >
- <template slot-scope="scope">
- <el-button
- type="text"
- size="small"
- @click="adverseCloseSaleMaterial(scope.row)"
- v-if="scope.row.deletedStatus != null"
- >反关闭分录</el-button
- >
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- <div class="address">
- <!-- 收货地址弹出框 -->
- <el-dialog title="收货地址" :visible.sync="drawer" width="90%">
- <el-form :inline="true">
- <el-form-item>
- <label class="el-form-item__label" style="width: auto">省</label>
- <el-select
- v-model="province"
- filterable
- placeholder="请选择"
- @change="onchangeProvince"
- >
- <el-option
- v-for="item in provinceList"
- :key="item.id"
- :label="item.addressProvince"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <label class="el-form-item__label" style="width: auto">市</label>
- <el-select
- v-model="city"
- filterable
- placeholder="请选择"
- @change="onchangeCity"
- >
- <el-option
- v-for="item in cityList"
- :key="item.id"
- :label="item.addressDistrict"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <label class="el-form-item__label" style="width: auto"
- >县(区)</label
- >
- <el-select
- v-model="county"
- filterable
- placeholder="请选择"
- @change="onchangeCounty"
- >
- <el-option
- v-for="item in countyList"
- :key="item.id"
- :label="item.addressTown"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <label class="el-form-item__label" style="width: auto"
- >具体收货地址</label
- >
- <el-autocomplete
- class="inline-input"
- v-model="place"
- :fetch-suggestions="querySearch1"
- placeholder="请输入具体收货地址"
- :trigger-on-focus="false"
- @select="handleSelect1"
- >
- </el-autocomplete>
- </el-form-item>
- </el-form>
- <div slot="footer" class="button-box">
- <el-button @click="drawer = false">取消</el-button>
- <el-button type="primary" @click="addAddressClick">确定</el-button>
- </div>
- </el-dialog>
- </div>
- <!-- 多拼弹出层-->
- <el-dialog title="生成多拼" :visible.sync="dialogTableVisible" style="width:500px">
- <el-form :inline="true">
- <el-form-item>
- <el-autocomplete
- style="width: 120px"
- v-model="capacityNo"
- :fetch-suggestions="querySearch"
- placeholder="请输入车牌号"
- @select="handleMulSelect"
- ></el-autocomplete>
- <el-button
- @click="updateMulCapacity"
- type="primary"
- >提交</el-button
- >
- </el-form-item>
- </el-form>
- </el-dialog>
- </div>
- </template>
- <script>
- import { sjTime, isVehicleNumber } from "@/utils/sharedJsFile";
- import { getCookie } from "@/utils/util.js";
- export default {
- data() {
- return {
- // 线路名称
- lineName: "",
- //线路id
- lineId: null,
- drawer: false,
- clickIndex: null,
- input: null,
- screen: "",
- dialogTableVisible:false,
- newsCapacityId:null,
- capacityNo:null,
- selection:[],
- options: [
- {
- value: "下单客户",
- lable: "下单客户",
- },
- {
- value: "承运商",
- lable: "承运商",
- },
- {
- value: "车牌号",
- lable: "车牌号",
- },
- {
- value: "路线",
- lable: "路线",
- },
- ],
- startTime: null,
- endTime: null,
- //合计净重
- totalNumber: 0,
- //合计车数
- totalCapacity: 0,
- tableTitle: "销售统计报表",
- capacityList: [],
- carrierList: [],
- // 线路
- LineList: [],
- tableData: [],
- spanArr: [],
- pos: 0,
- a: 1,
- isCellClick: 0,
- columnIndexs: [
- 1, 2, 3,4, 7, 8, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 29, 31,
- ],
- //钢材多拼车辆线路ID
- //索引从1-10为1-10拼路线ID
- // lineSpelling: [
- // 0,
- // 110001,
- // 110002,
- // 110003,
- // 110004,
- // 110005,
- // 110006,
- // 110007,
- // 110008,
- // 110009,
- // 110010
- // ],
- //达州站内转多拼车辆线路ID,从1-5为1-5拼线路id
- lineDazhou:[
- 0,
- 189982,
- 189983,
- 189984,
- 189985,
- 189986
- ],
- //专用线内转多拼车辆线路ID,从1-5为1-5拼线路id
- lineZhuanxian:[
- 0,
- 189987,
- 189988,
- 189989,
- 189990,
- 189991
- ],
- sendStationId:null,
- sendStations:[],
- tableTitle: "销售钢材统计报表",
- //所有省
- provinceList: [],
- //选中的省
- province: "",
- //所有市
- cityList: [],
- //选中的市
- city: "",
- //所有的县(区)
- countyList: [],
- //选中的县
- county: "",
- //地址输入框的值
- addresText: "",
- //已选中省市县
- address: null,
- //具体地址
- place: null,
- //暂存具体地址
- place1: null,
- //省市县Id
- addressId: null,
- direction: "rtl",
- addressRow: {},
- consigneeDisable: false,
- };
- },
- created() {},
- mounted() {
- this.getSteelReport();
- this.getSendStations();
- },
- methods: {
- //反关闭整条分录
- adverseCloseSaleMaterial(row) {
- console.log(row.saleMaterialId);
- this.$confirm("确定反关闭该条分录?", "提示", {
- cancelButtonText: "确定",
- confirmButtonText: "取消",
- center: true,
- }).then(() => {
- this.axios
- .post(
- "/api/v1/ams/adverseCloseSaleMaterial?saleMaterialId=" +
- row.saleMaterialId
- )
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("反关闭成功");
- this.getSteelReport();
- } else {
- this.$message.error("反关闭失败");
- this.getSteelReport();
- }
- })
- .catch(() => {
- this.$message.error("反关闭失败");
- this.getSteelReport();
- });
- });
- },
- //销售钢材报表导出excel
- exportAllReportToExcel() {
- const loading = this.$loading({
- lock: true,
- text: "正在导出Excel",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- var title = this.tableTitle;
- let tHeader = [];
- let filterVal = [];
- console.log(this.$refs.tableRef);
- this.$refs.tableRef.$children.forEach((item) => {
- if (item.label != undefined && item.prop != undefined) {
- if (tHeader.indexOf(item.label) === -1) {
- tHeader.push(item.label);
- }
- if (filterVal.indexOf(item.prop) === -1) {
- filterVal.push(item.prop);
- }
- }
- });
- this.downloadLoading = true;
- require.ensure([], () => {
- const {
- export_json_to_excel,
- } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
- let data = this.tableData.map((v) => filterVal.map((j) => v[j])); //3.formatJson格式转换
- export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
- });
- loading.close();
- },
- changeScreen() {
- console.log(this.screen);
- },
- cellClik(row, column, cell, event) {
- if (row.group != this.clickIndex) {
- // this.getSteelReport();
- this.tableData.forEach((item) => {
- if (item.group == this.clickIndex) {
- this.$set(item, "isCapacityShow", 0);
- this.$set(item, "isCarrierShow", 0);
- this.$set(item, "isTelShow", 0);
- this.$set(item, "isAddressShow", 0);
- this.$set(item, "isNumShow", 0);
- this.$set(item, "isLineName", 0);
- this.$set(item, "isSendStationName", 0);
- }
- });
- }
- if (column.property == "capacityNo") {
- this.$set(row, "isCapacityShow", 1);
- this.clickIndex = row.group;
- }
- if (column.property == "lineName") {
- this.$set(row, "isLineName", 1);
- this.clickIndex = row.group;
- }
- if (column.property == "sendStationName") {
- this.$set(row, "isSendStationName", 1);
- this.clickIndex = row.group;
- }
- if (column.property == "carrierName") {
- this.$set(row, "isCarrierShow", 1);
- this.clickIndex = row.group;
- }
- if (column.property == "capacityTel") {
- this.$set(row, "isTelShow", 1);
- this.clickIndex = row.group;
- }
- if (column.property == "addressPlace") {
- this.$set(row, "isAddressShow", 1);
- this.clickIndex = row.group;
- }
- if (column.property == "materialNum") {
- this.$set(row, "isNumShow", 1);
- this.clickIndex = row.group;
- }
- },
- //承运商弹出层
- handleSelectCarrier(row, index, item) {
- this.carrierList.forEach((item) => {
- if (item.carrierName == row.carrierName) {
- row.newCarrierId = item.carrierId;
- row.carrierId = item.carrierId;
- }
- });
- },
- //承运商边输边查
- querySearchCarrier(queryString, cb) {
- if (queryString.length > 1) {
- this.axios
- .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
- .then((res) => {
- if (res.data.code == "200") {
- this.carrierList = [];
- if (res.data.data.length == 0) {
- this.$message.info("承运商不存在,请前往注册");
- return;
- }
- var restaurants = res.data.data;
- this.carrierList = res.data.data;
- var results = queryString
- ? restaurants.filter(this.createFilterCarrier(queryString))
- : restaurants;
- cb(results);
- }
- });
- }
- },
- querySearchLineName(queryString, cb) {
- if (queryString.length > 1) {
- this.axios
- .post(
- "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + queryString
- )
- .then((res) => {
- console.log(res.data.data.list.length);
- console.log(res.data.data);
- if (res.data.code == "200") {
- this.LineList = [];
- if (res.data.data.list.length == 0) {
- this.$message.info("线路不存在,请前往注册");
- return;
- }
- var restaurants = res.data.data.list;
- this.LineList = res.data.data.list;
- console.log(this.LineList);
- var results = queryString
- ? restaurants.filter(this.createFilterLine(queryString))
- : restaurants;
- cb(results);
- }
- });
- }
- },
- //获取发站
- getSendStations() {
- this.axios
- .get(
- "/api/v1/uc/getInwardSendStation"
- )
- .then((res) => {
- console.log(res.data.data);
- if (res.data.code == "200") {
- this.sendStations = res.data.data;
- }
- });
- },
- // 过滤器
- createFilterLine(queryString) {
- return (restaurants) => {
- return (
- restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- );
- };
- },
- createFilterCarrier(queryString) {
- return (restaurants) => {
- return (
- restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- );
- };
- },
- //以下是车牌号边输边查搜索
- querySearch(queryString, cb) {
- if (queryString.length > 3) {
- this.axios
- .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
- .then((res) => {
- this.capacityList = [];
- if (res.data.code == "200") {
- if (res.data.data.length == 0) {
- this.$message.info("车牌号不存在,请前往注册");
- return;
- }
- var restaurants = res.data.data;
- this.capacityList = res.data.data;
- var results = queryString
- ? restaurants.filter(this.createFilter(queryString))
- : restaurants;
- // console.log("res",+results);
- // 调用 callback 返回建议列表的数据
- cb(results);
- }
- });
- }
- },
- createFilter(queryString) {
- return (restaurants) => {
- return (
- restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- );
- };
- },
- //车牌号弹出层
- handleSelect(row, index) {
- this.capacityList.forEach((item) => {
- if (item.capacityNumber === row.capacityNo) {
- row.newsCapacityId = item.capacityId;
- }
- });
- },
- //多拼弹出层绑定车牌号
- handleMulSelect(row, index) {
- this.capacityList.forEach((item) => {
- if (item.capacityNumber === row.capacityNo) {
- this.selection.forEach((selected)=>{
- selected.newsCapacityId = item.capacityId;
- selected.capacityNo=row.capacityNo;
- });
- this.newsCapacityId=item.capacityId;
- this.capacityNo=row.capacityNo;
- console.log("newCapacityId:",this.newsCapacityId);
- }
- });
- },
- // 线路弹出层
- handleSelectLine(row, index) {
- this.capacityList.forEach((item) => {
- if (item.lineName === row.lineName) {
- row.newLineId = item.lineId;
- }
- });
- },
- // 更新线路
- updateLine(row) {
- row.lineId = this.lineId;
- console.log("this.lineId" +this.lineId);
- },
- updateSendStation(selection,row){
- let sendStation=this.sendStations.find(item=>item.sendStationId==row.sendStationId);
- row.sendStation=sendStation.sendStation;
- console.log("sendStation",sendStation);
- //绑定线路id
- // let i = 0;
- // this.tableData.forEach((e) => {
- // if (row.group == e.group) {
- // i++;//得到拼数
- // }
- // });
- // if(row.sendStation=="达州站"){
- // row.lineId=this.lineDazhou[i];
- // }else if(row.sendStation=="专用线"){
- // row.lineId=this.lineZhuanxian[i];
- // }else{
- // console.log("没有该发站的线路");
- // }
- console.log("row:",row);
- },
- updateCapacity(row) {
- row.isIwardSteel=4;
- row.saleOrderMaterialId=row.saleOrderId;
- if (row.newsCapacityId == null) {
- this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
- return;
- }
- if (!isVehicleNumber(row.capacityNo)) {
- this.$message.error("请输入正确格式的车牌号!");
- return;
- }
- if (row.capacityIds != 0) {
- const loading = this.$loading({
- lock: true,
- text: "正在变更车牌号",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/updateCapacityNumberInFactory", row)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("变更车牌号成功!");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.success("变更失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.success("变更失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- } else {
- if (row.carrierIds == 0) {
- this.$message.error("请先选择承运商!");
- return;
- }
- row.driverTel = row.capacityTel;
- row.capacityNumber = row.capacityNo;
- let arr = [];
- arr.push(row);
- const loading = this.$loading({
- lock: true,
- text: "正在变更车牌号",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/dispatchSteelOrder", arr)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("派车成功!");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("派车失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("派车失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- }
- },
-
- //多拼修改
- updateMulCapacity() {
- this.selection.forEach((item)=>{
- item.isIwardSteel=4;
- item.saleOrderMaterialId=item.saleOrderId;
- item.capacityId=this.capacityId;
- item.capacityNumber=this.capacityNo;
- });
- if(this.selection[0].sendStation=="达州站"){
- this.selection.forEach((item)=>{
- item.lineId=this.lineDazhou[this.selection.length];
- item.lineName="达州站";
- });
- }else if(this.selection[0].sendStation=="专用线"){
- this.selection.forEach((item)=>{
- item.lineId=this.lineZhuanxian[this.selection.length];
- item.lineName="专用线";
- });
- }else{
- console.log("没有该发站的线路");
- }
- console.log("selection:",this.selection);
- return;
- if (row.newsCapacityId == null) {
- this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
- return;
- }
- if (!isVehicleNumber(row.capacityNo)) {
- this.$message.error("请输入正确格式的车牌号!");
- return;
- }
- if (row.capacityIds != 0) {
- const loading = this.$loading({
- lock: true,
- text: "正在变更车牌号",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/updateCapacityNumberInFactory", row)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("变更车牌号成功!");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.success("变更失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.success("变更失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- } else {
- if (row.carrierIds == 0) {
- this.$message.error("请先选择承运商!");
- return;
- }
- row.driverTel = row.capacityTel;
- row.capacityNumber = row.capacityNo;
- let arr = [];
- arr.push(row);
- const loading = this.$loading({
- lock: true,
- text: "正在变更车牌号",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/dispatchSteelOrder", arr)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("派车成功!");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("派车失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("派车失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- }
- },
-
- //修改司机电话号码
- updateDriverTel(row) {
- const loading = this.$loading({
- lock: true,
- text: "修改电话号码中",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- if (row.capacityTel == null || row.capacityTel == "") {
- this.$message.error("电话号码不能为空");
- return;
- }
- this.axios
- .post("/api/v1/uc/updateDriverTel", {
- orderId: parseInt(row.orderId),
- driverTel: row.capacityTel,
- })
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("修改成功");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("修改失败");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("修改失败");
- this.getSteelReport();
- loading.close();
- });
- },
- //关闭车辆金蝶分录
- deleteEasEntryId(row) {
- this.$confirm("确定关闭该车金蝶分录吗?", "提示", {
- confirmButtonText: "是",
- cancelButtonText: "否",
- center: true,
- type: "warning",
- })
- .then(() => {
- let map = row;
- map.isCloseEas = Number(0);
- const loading = this.$loading({
- lock: true,
- text: "正在关闭车辆",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/updateCarAddress", map)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("关闭车辆成功");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("关闭车辆失败");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("关闭车辆失败");
- this.getSteelReport();
- loading.close();
- });
- })
- .catch(() => {
- this.$message.info("取消关闭");
- });
- },
- //修改承运商授权
- updateTruckCarrier(row) {
- if(!row.saleOrderMaterialId){
- row.saleOrderMaterialId=row.saleOrderId;
- }
- if (row.newCarrierId == null) {
- this.$message.warning("请注册承运商或者选中弹出层之后再提交!");
- this.getSteelReport();
- return;
- }
- if (row.carrierIds != 0) {
- const loading = this.$loading({
- lock: true,
- text: "正在修改承运商授权",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/updateTruckNoCarrier", row)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("修改承运商授权成功");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("修改失败,请联系管理员!");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("修改失败,请联系管理员!");
- this.getSteelReport();
- loading.close();
- });
- } else {
- //授权承运商
- let arr = [];
- arr.push(row);
- const loading = this.$loading({
- lock: true,
- text: "正在授权承运商",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- this.axios
- .post("/api/v1/ams/dispatchToCarrier", arr)
- .then((res) => {
- if (res.data.code == "0") {
- this.$message.success("授权承运商成功");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("授权失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("授权失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- }
- },
- updateAddress(row) {
- this.drawer = true;
- this.addressRow = row;
- this.province = row.addressProvince;
- this.city = row.addressDistrict;
- this.county = row.addressTown;
- this.addressId = row.shipperAddressId;
- this.getAllProvince();
- this.onchangeProvince();
- this.onchangeCity();
- },
- //获取所有省数据
- getAllProvince() {
- this.axios.post("/api/v1/uc/getAllProvince").then((res) => {
- this.provinceList = res.data.data;
- });
- },
- //省改变
- onchangeProvince() {
- this.axios
- .post(
- "/api/v1/uc/getDistrictByProvince?addressProvince=" +
- this.province +
- "&i=" +
- new Date()
- )
- .then((res) => {
- this.cityList = res.data.data;
- // this.city = "";
- // this.county = "";
- });
- },
- //市改变
- onchangeCity() {
- this.axios
- .post(
- "/api/v1/uc/getTownByDistrict?addressDistrict=" +
- this.city +
- "&i=" +
- new Date()
- )
- .then((res) => {
- this.countyList = res.data.data;
- });
- },
- //县(区)改变
- onchangeCounty() {
- let mapValue = {
- addressProvince: this.province,
- addressDistrict: this.city,
- addressTown: this.county,
- };
- this.axios
- .post("/api/v1/uc/getPlaceByAllAddress", mapValue)
- .then((res) => {
- this.addressId = res.data.data[0].addressId;
- });
- },
- //收货地址弹出层
- handleSelect1(item) {
- console.log("获取所有下拉值!");
- },
- //以下是收货地址边输边查搜索
- querySearch1(queryString, cb) {
- this.axios
- .post(
- "/api/v1/ams/getRealAddressByLike?addressId=" +
- this.addressId +
- "&index=" +
- queryString
- )
- .then((res) => {
- if (res.data.code == "200") {
- var restaurants = res.data.data;
- var results = queryString
- ? restaurants.filter(this.createFilter1(queryString))
- : restaurants;
- // 调用 callback 返回建议列表的数据
- cb(results);
- }
- });
- },
- createFilter1(queryString) {
- return (restaurants) => {
- return (
- restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- );
- };
- },
- //修改收货地址
- addAddressClick() {
- const loading = this.$loading({
- lock: true,
- text: "正在修改收货地址",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- let map = this.addressRow;
- map.isCloseEas = Number(1);
- map.isNewCar = Number(1);
- map.place = this.place;
- map.shipperAddressId = this.addressId;
- this.axios
- .post("/api/v1/ams/updateCarAddress", map)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("修改收货地址成功!");
- this.getSteelReport();
- this.drawer = false;
- loading.close();
- } else {
- this.$message.error("修改失败,请联系管理员!");
- this.getSteelReport();
- this.drawer = false;
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("修改失败,请联系管理员!");
- this.getSteelReport();
- this.drawer = false;
- loading.close();
- });
- },
- //记录每一行的合并数
- getSpanArr(data) {
- //每次调用方法初始化
- this.spanArr = [];
- for (var i = 0; i < data.length; i++) {
- if (i === 0) {
- this.spanArr.push(1);
- data[i].group = i;
- this.pos = 0;
- } else {
- // 判断当前元素与上一个元素是否相同
- if (data[i].saleOrderId === data[i - 1].saleOrderMaterialId) {
- this.spanArr[this.pos] += 1;
- data[i].group = data[i - 1].group;
- this.spanArr.push(0);
- } else {
- this.spanArr.push(1);
- this.pos = i;
- data[i].group = data[i - 1].group + 1;
- }
- }
- this.totalCapacity = data[data.length - 1].group + 1;
- this.totalNumber = data.reduce(function (prev, item) {
- return prev + item.materialNum;
- }, 0);
- }
- },
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
- if (this.columnIndexs.indexOf(columnIndex) != -1) {
- const _row = this.spanArr[rowIndex];
- const _col = _row > 0 ? 1 : 0;
- return {
- rowspan: _row,
- colspan: _col,
- };
- }
- },
- //减少物资件数
- updateBillOrder(row) {
- const loading = this.$loading({
- lock: true,
- text: "修改物资件数中",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- let map = {
- materialId: row.materialId,
- materialNum: row.materialNum,
- };
- let arr = [];
- arr.push(map);
- let updateMap = {
- orderId: row.orderId,
- saleOrderId: row.saleOrderId,
- saleOrderMaterialId: row.saleOrderMaterialId,
- mapList: arr,
- };
- this.axios
- .post("/api/v1/oms/updateMaterialMes", updateMap)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("修改物资数量成功");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("修改物资数量失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("修改物资数量失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- },
- //关闭单条分录
- closeEasEntryId(row) {
- console.log(row);
- this.$prompt("确定关闭该条分录吗?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- center: true,
- inputPlaceholder: "请输入关闭理由",
- })
- .then(({ value }) => {
- if (value != null || value != "") {
- const loading = this.$loading({
- lock: true,
- text: "正在关闭该条分录",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- let map = {
- orderId: row.orderId,
- saleOrderMaterialId: row.saleOrderMaterialId,
- saleMaterialId: row.saleMaterialId,
- reason: value,
- number: row.saleOrderNo,
- closeEntryId: row.closeEntryId,
- };
- this.axios
- .post("/api/v1/ams/closeSteelMaterialId", map)
- .then((res) => {
- if (res.data.code == "200") {
- this.$message.success("关闭成功");
- this.getSteelReport();
- loading.close();
- } else {
- this.$message.error("关闭失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- }
- })
- .catch(() => {
- this.$message.error("关闭失败,请联系管理员");
- this.getSteelReport();
- loading.close();
- });
- }
- })
- .catch(() => {
- this.$message.info("取消输入");
- });
- },
- //查询,输入查询条件
- onclick() {
- let startTime = null;
- let endTime = null;
- let carrierSsoId = null;
- let carrierName = null;
- let consigneeName = null;
- let capacityNo = null;
- let remark = null;
- let saler = null;
- if (this.startTime && this.endTime) {
- startTime = sjTime(this.startTime);
- endTime = sjTime(this.endTime);
- }
- if (getCookie("orgCode") == "chengyunshang") {
- carrierSsoId = getCookie("userId");
- }
- if (getCookie("orgCode") == "xiaoshouyewuyuan") {
- saler = getCookie("loginName");
- }
- if (this.screen == "下单客户") {
- consigneeName = this.input;
- } else if (this.screen == "承运商") {
- carrierName = this.input;
- } else if (this.screen == "车牌号") {
- capacityNo = this.input;
- } else {
- remark = this.input;
- }
- this.axios
- .post(
- "/api/v1/tms/getInwardSaleSteelReport?startTime=" +
- startTime +
- "&endTime=" +
- endTime +
- "&carrierSsoId=" +
- carrierSsoId +
- "&i=" +
- new Date() +
- "&remark=" +
- remark +
- "&consigneeName=" +
- consigneeName +
- "&carrierName=" +
- carrierName +
- "&capacityNo=" +
- capacityNo +
- "&saler=" +
- saler
- )
- .then((res) => {
- this.tableData = res.data.data;
- this.getSpanArr(res.data.data);
- });
- },
- //重新获取表格数据
- refresh() {
- this.getSteelReport();
- },
- //获取钢材统计报表
- getSteelReport() {
- let carrierSsoId = null;
- let saler = null;
- if (getCookie("orgCode") == "chengyunshang") {
- carrierSsoId = getCookie("userId");
- }
- if (getCookie("orgCode") == "xiaoshouyewuyuan") {
- saler = getCookie("loginName");
- }
- this.axios
- .post(
- "/api/v1/tms/getInwardSaleSteelReport?startTime=" +
- null +
- "&endTime=" +
- null +
- "&carrierSsoId=" +
- carrierSsoId +
- "&saler=" +
- saler +
- "&i=" +
- new Date()
- )
- .then((res) => {
- this.tableData = res.data.data;
- this.getSpanArr(res.data.data);
- });
- },
- //控制列自动撑开
- flexColumnWidth(str, tableData, flag) {
- // str为该列的字段名(传字符串);tableData为该表格的数据源(传变量);
- // flag为可选值,可不传该参数,传参时可选'max'或'equal',默认为'max'
- // flag为'max'则设置列宽适配该列中最长的内容,flag为'equal'则设置列宽适配该列中第一行内容的长度。
- str = str + "";
- let columnContent = "";
- if (
- !tableData ||
- !tableData.length ||
- tableData.length === 0 ||
- tableData === undefined
- ) {
- return;
- }
- if (!str || !str.length || str.length === 0 || str === undefined) {
- return;
- }
- if (flag === "equal") {
- // 获取该列中第一个不为空的数据(内容)
- for (let i = 0; i < tableData.length; i++) {
- if (tableData[i][str].length > 0) {
- columnContent = tableData[i][str] + "";
- break;
- }
- }
- } else {
- // 获取该列中最长的数据(内容)
- let index = 0;
- for (let i = 0; i < tableData.length; i++) {
- if (tableData[i][str] === null) {
- // 当数据为空时跳过本次循环获取下一条数据长度
- continue;
- }
- const now_temp = tableData[i][str] + "";
- const max_temp = tableData[index][str] + "";
- if (now_temp.length > max_temp.length) {
- index = i;
- }
- }
- columnContent = tableData[index][str] + "";
- } // 以下分配的单位长度可根据实际需求进行调整
- let flexWidth = 0;
- if (columnContent != undefined) {
- for (const char of columnContent) {
- if ((char >= "A" && char <= "Z") || (char >= "a" && char <= "z")) {
- // 如果是英文字符,为字符分配10个单位宽度
- flexWidth += 10;
- } else if (char >= "\u4e00" && char <= "\u9fa5") {
- // 如果是中文字符,为字符分配16个单位宽度
- flexWidth += 14;
- } else {
- // 其他种类字符,为字符分配10个单位宽度
- flexWidth += 10;
- }
- }
- }
- if (flexWidth < 80) {
- // 设置最小宽度
- flexWidth = 80;
- }
- if (flexWidth > 500) {
- // 设置最大宽度
- flexWidth = 500;
- }
- return flexWidth + "px";
- },
- //多拼弹出层
- showDialog(){
- let selection=this.$refs.tableRef.selection;
- console.log("selection",selection);
- if(selection && selection.length>0){
- if(selection.find(item=>item.lineId != selection[0].lineId || item.saleOrderId!=selection[0].saleOrderId)){
- this.$message({
- message:"无法生成多拼,订单或者线路不一致",
- type:"warning"
- });
- return;
- }
- this.dialogTableVisible=true;
- this.selection=selection;
- this.capacityNo=selection[0].capacityNo;
- }else{
- this.$message({
- message:"请先勾选再生成多拼",
- type:"warning"
- });
- }
- },
- handleSelectConsignee(item) {
- this.consigneeName = item.consigneeCompanyName;
- this.consigneeId = item.consigneeId;
- this.isReceiveHaveArea(this.consigneeId);
- //带出摘要
- this.axios
- .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
- .then(res => {
- this.remarks = res.data.data;
- });
- this.axios
- .post(
- "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
- )
- .then(res => {
- const place = res.data.data;
- console.log(place);
- this.saleShipperAddressName =
- place[0].addressProvince +
- place[0].addressDistrict +
- place[0].addressTown +
- place[0].place;
- this.saleShipperAddressId = place[0].shipperAddressId;
- this.addressId = place[0].shipperAddressId;
- this.place1 = place[0].place;
- this.saleMan = place[0].salerId;
- this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
- this.province = place[0].addressProvince;
- this.city = place[0].addressDistrict;
- this.county = place[0].addressTown;
- });
- },
- //以下是下单客户边输边查搜索
- querySearchConsignee(queryString, cb) {
- this.axios
- .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
- .then(res => {
- if (res.data.code == "200") {
- this.consignee = res.data.data;
- var restaurantsConsignee = res.data.data;
- var results = queryString
- ? restaurantsConsignee.filter(
- this.createFilter1(queryString)
- )
- : restaurantsConsignee;
- // 调用 callback 返回建议列表的数据
- cb(results);
- }
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .purchasFuelNewMonitor {
- .tableTop {
- margin-left: 20px;
- margin-top: 20px;
- }
- .table {
- margin-left: 20px;
- margin-top: 20px;
- }
- .address {
- .button-box {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- }
- </style>
|