pyt
2025-02-13 7823f4ef5ae7e3cc4c49f44706b06ad99bb1cfe5
bug修复
3个文件已修改
281 ■■■■ 已修改文件
src/view/Home.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/addOrder.vue 218 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/addservier.js 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/Home.vue
@@ -75,13 +75,22 @@
                </el-table-column>
                <el-table-column width="200" prop="estimatedArrival" label="预计到达时间" align="center">
                </el-table-column>
                <el-table-column width="200" prop="pickupDate" label="提柜日期" align="center">
                </el-table-column>
                <el-table-column width="200" prop="deliverySchedule" label="预计送柜日期" align="center">
                </el-table-column>
                <el-table-column width="200" prop="cargoType" label="柜型" align="center">
                </el-table-column>
                <el-table-column width="200" prop="realSchedule" label="实际送货日期" align="center">
                </el-table-column>
                <el-table-column width="150" prop="DO" label="DO文件是否上传" align="center">
                    <template slot-scope="scope">
                        <div>{{ scope.row.DO ? '是' : '否' }}</div>
                    </template>
                </el-table-column>
                <el-table-column width="150" prop="asPU" label="PU文件是否上传" align="center">
                    <template slot-scope="scope">
                        <div>{{ scope.row.asPU ? '是' : '否' }}</div>
                    </template>
                </el-table-column>
                <el-table-column width="150" prop="status" label="订单状态" align="center">
@@ -177,6 +186,14 @@
                {
                    id: '已取消',
                    label: '已取消'
                },
                {
                    id: '预约中',
                    label: '预约中'
                },
                {
                    id: '预约完成',
                    label: '预约完成'
                }
            ],
            tableData: [],
src/view/addOrder.vue
@@ -462,17 +462,26 @@
              @change="onEditorChange($event)">
            </quill-editor>
          </div>
          <div class="flex " style="padding-bottom: 27px;">
            <div class="box10">
              <div class="flex">
                <div class="box_text1">保存信息:</div>
              </div>
              <div class="box_text3">Save Information</div>
            </div>
            <el-radio v-model="isSave" :label="true">是</el-radio>
            <el-radio v-model="isSave" :label="false">否</el-radio>
          </div>
        </el-card>
        <el-card class="box-card mt-13">
        <el-card v-if="type == 'detail'" class="box-card mt-13">
          <div slot="header" class="clearfix">
            <span class="clearfix_text">货柜动态</span>
          </div>
          <div class="box-cardes">
            <div class="flex">
              <el-form-item label="" class="label1" prop="clientOrder" label-width="0">
              <el-form-item label="" class="label1" label-width="0">
                <div class="flex">
                  <div class="box9" style="width: 200px">
                    <div class="flex">
@@ -481,112 +490,96 @@
                    </div>
                    <div class="box_text2">Frame number</div>
                  </div>
                  <el-input :disabled="type == 'detail'" v-model="form.clientOrder" placeholder="请输入"></el-input>
                  <el-input v-model="form.frameNumber" readonly></el-input>
                </div>
              </el-form-item>
              <el-form-item label="" class="label2" prop="product" label-width="0px">
              <el-form-item label="" class="label2" label-width="0px">
                <div class="flex">
                  <div class="box1">
                    <div class="flex">
                      <div class="red">*</div>
                      <div class="box_text1">最晚免费日期:</div>
                    </div>
                    <div class="box_text2">LFD</div>
                  </div>
                  <el-input :disabled="type == 'detail'" v-model="form.product" placeholder="请输入"></el-input>
                  <el-input v-model="form.LFD" readonly></el-input>
                </div>
              </el-form-item>
              <el-form-item label="" class="label3" prop="QTY" label-width="0px">
              <el-form-item label="" class="label3" label-width="0px">
                <div class="flex">
                  <div class="box3">
                    <div class="flex">
                      <div class="red">*</div>
                      <div class="box_text1">提柜日期:</div>
                    </div>
                    <div class="box_text2">Pickup Date</div>
                  </div>
                  <el-input :disabled="type == 'detail'" v-model="form.QTY" placeholder="请输入"></el-input>
                  <el-input v-model="form.pickUpDate" readonly></el-input>
                </div>
              </el-form-item>
              <el-form-item label="" class="label4" prop="QTYUnit" label-width="0">
              <el-form-item label="" class="label4" label-width="0">
                <div class="flex">
                  <div class="box2">
                    <div class="flex">
                      <div class="red">*</div>
                      <div class="box_text1">计划送柜日期:</div>
                    </div>
                    <div class="box_text2">Delivery Schedule</div>
                  </div>
                  <el-select :disabled="type == 'detail'" v-model="form.QTYUnit" clearable placeholder="请选择">
                    <el-option :label="item.label" :value="item.value" v-for="item in optionsUs"
                      :key="item.value"></el-option>
                  </el-select>
                  <el-input v-model="form.deliverySchedule" readonly></el-input>
                </div>
              </el-form-item>
            </div>
            <div class="flex">
              <el-form-item label="" class="label6" prop="weight" label-width="0px">
              <el-form-item label="" class="label6" label-width="0px">
                <div class="flex">
                  <div class="box9" style="width: 200px">
                    <div class="flex">
                      <div class="red">*</div>
                      <div class="box_text1">实际送货日期:</div>
                    </div>
                    <div class="box_text2"></div>
                  </div>
                  <el-input type="number" :disabled="type == 'detail'" v-model="form.weight" @input="onInput"
                    placeholder="请输入">
                    <div style="line-height: 50px;" slot="prefix-icon">KG</div>
                  </el-input>
                  <el-input v-model="form.actualSchedule" readonly></el-input>
                </div>
              </el-form-item>
              <el-form-item label="" class="label2" prop="poundWeight" label-width="0px">
              <el-form-item label="" class="label2" label-width="0px">
                <div class="flex">
                  <div class="box1">
                    <div class="flex">
                      <!-- <div class="red">*</div> -->
                      <div class="box_text1">送柜日期:</div>
                    </div>
                    <div class="box_text2">Delivery Date</div>
                  </div>
                  <el-input disabled v-model="form.poundWeight" placeholder="请输入">
                    <div style="line-height: 50px;" slot="suffix">LBS</div>
                  </el-input>
                  <el-input v-model="form.deliveryDate" readonly></el-input>
                </div>
              </el-form-item>
              <el-form-item label="" class="label3" prop="volume" label-width="0px">
              <el-form-item label="" class="label3" label-width="0px">
                <div class="flex">
                  <div class="box3">
                    <div class="flex">
                      <div class="red">*</div>
                      <div class="box_text1">报空日期:</div>
                    </div>
                    <div class="box_text2">Empty Report Date</div>
                  </div>
                  <el-input type="number" :disabled="type == 'detail'" v-model="form.volume" placeholder="请输入">
                    <div style="line-height: 50px;" slot="suffix">CMB</div>
                  </el-input>
                  <el-input v-model="form.emptyReportDate" readonly></el-input>
                </div>
              </el-form-item>
              <el-form-item label="" class="label4" prop="QTYUnit" label-width="0">
              <el-form-item label="" class="label4" label-width="0">
                <div class="flex">
                  <div class="box2">
                    <div class="flex">
                      <div class="red">*</div>
                      <div class="box_text1">还空日期:</div>
                    </div>
                    <div class="box_text2">Empty Return Date</div>
                  </div>
                  <el-select :disabled="type == 'detail'" v-model="form.QTYUnit" clearable placeholder="请选择">
                    <el-option :label="item.label" :value="item.value" v-for="item in optionsUs"
                      :key="item.value"></el-option>
                  </el-select>
                  <el-input v-model="form.emptyReturnDate" readonly></el-input>
                </div>
              </el-form-item>
            </div>
          </div>
        </el-card>
@@ -596,19 +589,19 @@
          </div>
          <div class="box-carde">
            <div class="flex">
              <el-form-item label="Do:" class="w-316" prop="DOFileUrl" label-width="88px">
              <el-form-item label="Do:" class="w-316" prop="DOFileUrls" label-width="88px">
                <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
                  :http-request="handleUpload1" action="#" :on-remove="handleRemove1" :on-exceed="handleExceed"
                  :file-list="fileList1">
                  <div class="upload_btn" v-if="form.DOFileUrl == ''">+上传附件</div>
                  <div class="upload_btn">+上传附件</div>
                </el-upload>
              </el-form-item>
              <el-form-item label="PU#:" class="w-316" prop="PUFileUrl" label-width="88px">
              <el-form-item label="PU#:" class="w-316" prop="PUFileUrls" label-width="88px">
                <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
                  :on-remove="handleRemove2" :http-request="handleUpload2" action="#" :on-exceed="handleExceed"
                  :file-list="fileList2">
                  <div class="upload_btn" v-if="form.PUFileUrl == ''">+上传附件</div>
                  <div class="upload_btn">+上传附件</div>
                </el-upload>
              </el-form-item>
              <el-form-item label="PU说明:" class="" prop="PUExplain" label-width="80px">
@@ -620,14 +613,14 @@
                <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
                  :on-remove="handleRemove3" :http-request="handleUpload3" action="#" :on-exceed="handleExceed"
                  :file-list="fileList3">
                  <div class="upload_btn" v-if="form.PODFileUrl == ''">+上传附件</div>
                  <div class="upload_btn">+上传附件</div>
                </el-upload>
              </el-form-item>
              <el-form-item label="其他附件:" class="w-316" prop="otherFileUrls" label-width="88px">
                <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
                  :on-remove="handleRemove4" :http-request="handleUpload4" action="#" :on-exceed="handleExceed"
                  :file-list="fileList4">
                  <div class="upload_btn" v-if="form.otherFileUrl == ''">+上传附件</div>
                  <div class="upload_btn">+上传附件</div>
                </el-upload>
              </el-form-item>
            </div>
@@ -647,7 +640,7 @@
</template>
<script>
import { addOrder, getaddress, edit, getDetail } from './addservier'
import { addOrder, getaddress, edit, getDetail, saveInfo } from './addservier'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
@@ -670,6 +663,7 @@
      activeTab: 1,
      show: false,
      detailInfo: {},
      isSave: false, //是否保存收件人信息
      form: {
        container: "", //集装箱号
        bol: "", //提单号
@@ -697,10 +691,10 @@
        QTYUnit: '',//单位
        email: "", //邮箱
        PUExplain: '',//PU说明
        PUFileUrl: '',//PU附件
        DOFileUrl: '',//DO附件
        PODFileUrl: '',//POD附件
        otherFileUrl: '',//其他附件
        PUFileUrls: [],//PU附件
        DOFileUrls: [],//DO附件
        PODFileUrls: [],//POD附件
        otherFileUrls: [],//其他附件
        specialRequest: '',//特殊要求
        remark: '',//备注
      },
@@ -725,9 +719,6 @@
          ],
        },
      },
      fileList1: [],
      fileList2: [],
      fileList3: [],
@@ -763,7 +754,7 @@
        },
      ],
      optionsSc: [
      {
        {
          value: "COSCO",
          label: "COSCO",
        },
@@ -831,7 +822,7 @@
          value: "OTHERS",
          label: "OTHERS",
        }
      ],
      //COSCO、OOCL、ONE、CMA CGM、EVERGREEN(EMC)、ZIM、YANG MING(YML)、WANHAI LINE(WHL)、MAERSK(MSK)、MSC、HMM、HPL、HDW、T.S.LINE、SEA LEAD、SM LINE、OTHERS
      optionsCpa: [
@@ -964,35 +955,32 @@
      }).then(resp => {
        this.form = resp.data
        this.detailInfo = resp.data
        this.form.DOFileUrl = resp.data.DOFileUrl ? resp.data.DOFileUrl : ''
        this.form.PUFileUrl = resp.data.PUFileUrl ? resp.data.PUFileUrl : ''
        this.form.PODFileUrl = resp.data.PODFileUrl ? resp.data.PODFileUrl : ''
        this.form.otherFileUrl = resp.data.otherFileUrl ? resp.data.otherFileUrl : ''
        if (resp.data.DOFileUrl) {
          this.fileList1.push({ url: resp.data.DOFileUrl, name: resp.data.DOFileUrl.split('ownload/')[1] })
        if (resp.data.DOFileUrls) {
          resp.data.DOFileUrls.map(item => {
            this.fileList1.push({ url: item.url, name: item.url.split('ownload/')[1] })
          })
        }
        if (resp.data.PUFileUrl) {
          this.fileList2.push({ url: resp.data.PUFileUrl, name: resp.data.PUFileUrl.split('ownload/')[1] })
        if (resp.data.PUFileUrls) {
          resp.data.PUFileUrls.map(item => {
            this.fileList2.push({ url: item.url, name: item.url.split('ownload/')[1] })
          })
        }
        if (resp.data.PODFileUrl) {
          this.fileList3.push({ url: resp.data.PODFileUrl, name: resp.data.PODFileUrl.split('ownload/')[1] })
        if (resp.data.PODFileUrls) {
          resp.data.PODFileUrls.map(item => {
            this.fileList3.push({ url: item.url, name: item.url.split('ownload/')[1] })
          })
        }
        if (resp.data.otherFileUrl) {
          this.fileList4.push({ url: resp.data.otherFileUrl, name: resp.data.otherFileUrl.split('ownload/')[1] })
        if (resp.data.otherFileUrls) {
          resp.data.otherFileUrls.map(item => {
            this.fileList4.push({ url: item.url, name: item.url.split('ownload/')[1] })
          })
        }
      })
    }
    getaddress({
      extra: JSON.parse(localStorage.getItem('userInfo')).extra
    }).then(resp => {
      console.log(resp, '----');
      if (resp.data.length > 0) {
        this.optionsPL = resp.data[0].ports
          .map(item => {
@@ -1047,14 +1035,27 @@
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          if (!this.form.tel && !this.form.email) {
            this.$message.error('联系电话和邮箱至少填写其中一项');
          } else {
            this.form.DOFileUrls = this.fileList1.map(item => {return { url: item.url }})
            this.form.PUFileUrls = this.fileList2.map(item => {return { url: item.url }})
            this.form.PODFileUrls = this.fileList3.map(item => {return { url: item.url }})
            this.form.otherFileUrls = this.fileList4.map(item => {return { url: item.url }})
            // 添加订单
            if (this.type === 'add') {
              if (this.isSave) {
                saveInfo({
                  extra: JSON.parse(localStorage.getItem('userInfo')).extra,
                  name: this.form.contact,
                  phone: this.form.tel,
                  email: this.form.email,
                  address: this.form.address,
                  remark: this.form.remark,
                })
              }
              addOrder({
                ...this.form,
                extra: JSON.parse(localStorage.getItem('userInfo')).extra
@@ -1087,10 +1088,10 @@
                    tel: "", //联系电话
                    email: "", //邮箱
                    PUExplain: '',//PU说明
                    PUFileUrl: '',//PU附件
                    DOFileUrl: '',//DO附件
                    PODFileUrl: '',//POD附件
                    otherFileUrl: '',//其他附件
                    PUFileUrls: [],//PU附件
                    DOFileUrls: [],//DO附件
                    PODFileUrls: [],//POD附件
                    otherFileUrls: [],//其他附件
                    specialRequest: '',//特殊要求
                    remark: '',//备注
@@ -1105,6 +1106,16 @@
              })
            } else {
              if (this.isSave) {
                saveInfo({
                  extra: JSON.parse(localStorage.getItem('userInfo')).extra,
                  name: this.form.contact,
                  phone: this.form.tel,
                  email: this.form.email,
                  address: this.form.address,
                  remark: this.form.remark,
                })
              }
              edit({
                ...this.form,
                extra: JSON.parse(localStorage.getItem('userInfo')).extra,
@@ -1138,10 +1149,10 @@
                    tel: "", //联系电话
                    email: "", //邮箱
                    PUExplain: '',//PU说明
                    PUFileUrl: '',//PU附件
                    DOFileUrl: '',//DO附件
                    PODFileUrl: '',//POD附件
                    otherFileUrl: '',//其他附件
                    PUFileUrls: [],//PU附件
                    DOFileUrls: [],//DO附件
                    PODFileUrls: [],//POD附件
                    otherFileUrls: [],//其他附件
                    specialRequest: '',//特殊要求
                    remark: '',//备注
@@ -1166,29 +1177,20 @@
        }
      });
    },
    handlePreview(e) {
      console.log(e, 'e');
      window.open(e.url)
    },
    handleRemove1(e) {
      console.log(e, 'e');
      this.form.DOFileUrl = '';
      this.fileList1 = []
      this.fileList1 = this.fileList1.filter(item => item.uid !== e.uid);
    },
    handleRemove2(e) {
      console.log(e, 'e');
      this.form.PUFileUrl = '';
      this.fileList2 = []
      this.fileList2 = this.fileList2.filter(item => item.uid !== e.uid);
    },
    handleRemove3(e) {
      console.log(e, 'e');
      this.form.PODFileUrl = '';
      this.fileList3 = []
      this.fileList3 = this.fileList3.filter(item => item.uid !== e.uid);
    },
    handleRemove4(e) {
      console.log(e, 'e');
      this.form.otherFileUrl = '';
      this.fileList4 = []
      this.fileList4 = this.fileList4.filter(item => item.uid !== e.uid);
    },
    handleExceed(e) {
@@ -1235,21 +1237,8 @@
      axios.post('http://47.108.239.173:2020/api/oss/new_temp_upload', obj).then(res => {
        if (res.status == 200) {
          this.upFileAsArrayBuffer('http://47.108.239.173:2020/api/oss/upload_file', e.file, { methods: 'POST', fileName: res.data.data }).then(resp => {
            console.log(resp, 'asdasdsad');
            if (resp.data.status === 0) {
              if (value == 1) {
                this.form.DOFileUrl = 'http://47.108.239.173:2020/api/oss/download/' + res.data.data
                console.log(this.fileList1, 'this.fileList1');
              } else if (value == 2) {
                this.form.PUFileUrl = 'http://47.108.239.173:2020/api/oss/download/' + res.data.data
                console.log(this.form.PUFileUrl, 'this.form.PUFileUrl');
              } else if (value == 3) {
                this.form.PODFileUrl = 'http://47.108.239.173:2020/api/oss/download/' + res.data.data
              } else {
                this.form.otherFileUrl = 'http://47.108.239.173:2020/api/oss/download/' + res.data.data
              }
              this[`fileList${value}`].push({ name: obj.originalName, url: 'http://47.108.239.173:2020/api/oss/download/' + resp.data.data })
              this.$forceUpdate()
            }
          })
@@ -1293,7 +1282,6 @@
    },
    handleUpload3(e) {
      let obj = {
        orgId: JSON.parse(localStorage.getItem('userInfo')).extra,
        fileSize: e.file.size,
@@ -1345,7 +1333,11 @@
}
.w-316 {
  width: 316px;
  width: 400px;
}
::v-deep .el-icon-close-tip {
  display: none !important;
}
.noactive {
src/view/addservier.js
@@ -1,22 +1,26 @@
import axios from "@/utils/request";
//添加订单
export const addOrder = (data) => {
  return axios.post("/zj0FFk5wx4S05X-zksG9xBd0i00XB-1", data);
};
//查询提柜地
export const getaddress = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zksJKOZX19c0XC-1", data);
  };
  //编辑
  export const edit = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zlFb9zLFcA40XL-1", data);
  };
  export const getDetail = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zksTNiUo9S40X7-1", data);
  };
export const uploader = (data) => {
    return axios.post("http://47.108.239.173:2020/api/oss/new_temp_upload", data);
  };
import axios from "@/utils/request";
//添加订单
export const addOrder = (data) => {
  return axios.post("/zj0FFk5wx4S05X-zksG9xBd0i00XB-1", data);
};
//查询提柜地
export const getaddress = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zksJKOZX19c0XC-1", data);
  };
  //编辑
  export const edit = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zlFb9zLFcA40XL-1", data);
  };
  export const getDetail = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zksTNiUo9S40X7-1", data);
  };
  export const uploader = (data) => {
    return axios.post("http://47.108.239.173:2020/api/oss/new_temp_upload", data);
  };
  // 保存收件人地址
  export const saveInfo = (data) => {
    return axios.post("/zj0FFk5wx4S05X-zmDUo7K2bVQ0XT-1", data);
  };