|
@@ -0,0 +1,265 @@
|
|
|
|
+// 采购内转需求
|
|
|
|
+<template>
|
|
|
|
+ <div class="admin">
|
|
|
|
+ <template>
|
|
|
|
+ <div class="admin1">
|
|
|
|
+ <el-tabs v-model="activeName">
|
|
|
|
+ <el-tab-pane label="补录计量实绩" name="first">
|
|
|
|
+ <div class="admin2">
|
|
|
|
+ <div class="carrier from">
|
|
|
|
+ <el-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
+ label-width="80px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="车牌号:">
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ class="inline-input"
|
|
|
|
+ v-model="capacityName"
|
|
|
|
+ :fetch-suggestions="querySearchCapacity"
|
|
|
|
+ placeholder="车牌号"
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
+ @select="handleSelectCapacity"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ item }">
|
|
|
|
+ <div class="name">{{ item.capacityNumber }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="material from">
|
|
|
|
+ <span class="text">物资:</span>
|
|
|
|
+ <el-select v-model="materialId" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in materialList"
|
|
|
|
+ :key="item.materialId"
|
|
|
|
+ :label="item.materialName"
|
|
|
|
+ :value="item.materialId"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="firstWeight from">
|
|
|
|
+ <span class="demonstration">磅单号:</span>
|
|
|
|
+ <el-input v-model="poundNo"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="block">
|
|
|
|
+ <span class="demonstration">首次称重时间:</span>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="value1"
|
|
|
|
+ type="datetime"
|
|
|
|
+ placeholder="选择日期时间">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="firstWeight from">
|
|
|
|
+ <span class="demonstration">首次称重重量(吨):</span>
|
|
|
|
+ <el-input v-model="firstWeight"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="material from">
|
|
|
|
+ <span class="text">首次汽车衡:</span>
|
|
|
|
+ <el-select v-model="truckCalFirst" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in truckCalFirstList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="block">
|
|
|
|
+ <span class="demonstration">二次称重时间:</span>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="value2"
|
|
|
|
+ type="datetime"
|
|
|
|
+ placeholder="选择日期时间">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="firstWeight from">
|
|
|
|
+ <span class="demonstration">二次称重重量(吨):</span>
|
|
|
|
+ <el-input v-model="secondWeight"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="material from">
|
|
|
|
+ <span class="text">二次汽车衡:</span>
|
|
|
|
+ <el-select v-model="truckCalSecond" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in truckCalSecondList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="firstWeight from">
|
|
|
|
+ <span class="demonstration">净重(吨):</span>
|
|
|
|
+ <el-input v-model="netWeight"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="button_box">
|
|
|
|
+ <el-button @click="onClickCancel">返回</el-button>
|
|
|
|
+ <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="修改路段顺序" name="second">
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import { toDateString } from "../app.js"
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ activeName:"first",
|
|
|
|
+ capacityName:null,
|
|
|
|
+ stateCapacity:null,
|
|
|
|
+ materialList:[],
|
|
|
|
+ capacityId:null,
|
|
|
|
+ materialId:null,
|
|
|
|
+ value1:null,
|
|
|
|
+ value2:null,
|
|
|
|
+ disabled:false,
|
|
|
|
+ orderId:null,
|
|
|
|
+ firstWeight:null,
|
|
|
|
+ secondWeight:null,
|
|
|
|
+ netWeight:null,
|
|
|
|
+ poundNo:null,
|
|
|
|
+ truckCalFirstList:[],
|
|
|
|
+ truckCalSecondList:[],
|
|
|
|
+ truckCalFirst:null,
|
|
|
|
+ truckCalSecond:null
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created(){
|
|
|
|
+ },
|
|
|
|
+ mounted(){
|
|
|
|
+ this.information()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ //运力弹出层
|
|
|
|
+ handleSelectCapacity(item){
|
|
|
|
+ this.capacityId = item.capacityId
|
|
|
|
+ this.capacityName = item.capacityNumber
|
|
|
|
+ this.axios.get("/api/v1/uc/getOrderNumber?capacityId=" + this.capacityId).then((res) =>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.orderId = res.data.data.orderId
|
|
|
|
+ this.orderNumber = res.data.data.orderNumber
|
|
|
|
+ this.axios.get("/api/v1/uc/getMaterialIdByOrderId?orderId=" + this.orderId).then((res) =>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ this.materialList = res.data.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //以下是运力边输边查搜索
|
|
|
|
+ querySearchCapacity(queryString, cb) {
|
|
|
|
+ if(queryString.length < 3){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.axios.get('/api/v1/uc/getCapacityNumber?index='+queryString).then((res)=>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ var restaurantsCarrier = res.data.data
|
|
|
|
+ console.log(restaurantsCarrier,"restaurantsCarrier");
|
|
|
|
+ var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ cb(results);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ createFilterCarrier(queryString) {
|
|
|
|
+ return (restaurantsCarrier) => {
|
|
|
|
+ return (restaurantsCarrier.capacityNumber.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //以上是承运商边输边查搜索
|
|
|
|
+ information(){
|
|
|
|
+ this.axios.get("/api/v1/uc/getAllCalculateMes").then((res) =>{
|
|
|
|
+
|
|
|
|
+ this.truckCalFirstList = res.data
|
|
|
|
+ this.truckCalSecondList = res.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ onClickConfirm(){
|
|
|
|
+ console.log(toDateString(this.value1))
|
|
|
|
+ console.log(toDateString(this.value2))
|
|
|
|
+ console.log(this.firstWeight)
|
|
|
|
+ console.log(this.secondWeight)
|
|
|
|
+ console.log(this.netWeight)
|
|
|
|
+ console.log(this.orderId)
|
|
|
|
+ console.log(this.materialId)
|
|
|
|
+ console.log(this.poundNo)
|
|
|
|
+ let map = {
|
|
|
|
+ orderNumber:this.orderNumber,
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ var array = []
|
|
|
|
+ array.push(map)
|
|
|
|
+ console.log(array)
|
|
|
|
+ },
|
|
|
|
+ onClickCancel(){
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss">
|
|
|
|
+.admin{
|
|
|
|
+ .admin1 {
|
|
|
|
+ margin-top: 40px;
|
|
|
|
+ margin-left: 40px;
|
|
|
|
+ .button_box {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100px;
|
|
|
|
+ }
|
|
|
|
+ .admin2 {
|
|
|
|
+
|
|
|
|
+ margin-top: 40px;
|
|
|
|
+ .from {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
+ .material {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-right: 120px;
|
|
|
|
+ .text {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 170px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .block {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .firstWeight {
|
|
|
|
+ .el-input {
|
|
|
|
+ width: 250px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .carrier{
|
|
|
|
+ display: flex;
|
|
|
|
+ .el-autocomplete{
|
|
|
|
+ width: 250px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|