zouyu
2023-10-18 99494d05f34ad75fc82fd9a5355dbe6118a1639c
src/views/plan/customerorder/index.vue
@@ -80,7 +80,7 @@
          <el-button
            style="margin-left:10px;"
            type="primary"
            @click="exportStandBook"
            @click="()=>exportDialogVisible=true"
            >导出台账</el-button
          >
          <el-button
@@ -189,6 +189,26 @@
        </span>
        <span slot="footer" class="dialog-footer"> </span>
      </el-dialog>
      <!-- 导出 -->
      <el-dialog title="导出" :visible.sync="exportDialogVisible" width="30%">
        <div style="display: flex;justify-content: center">
          <el-form :model="dataForm" :inline="true" :rules="dataRule" ref="exportForm" class="l-mes">
            <el-form-item label="日期" prop="exportTime">
              <el-date-picker
                v-model="dataForm.exportTime"
                type="datetime"
                style="width:100%"
                placeholder="选择日期时间"
                value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible=false">取 消</el-button>
        <el-button type="primary" @click="exportStandBook">确 定</el-button>
      </span>
    </el-dialog>
      <!-- 箱码信息导出 -->
      <el-dialog
        title="箱码信息导出"
@@ -302,9 +322,12 @@
  data() {
    return {
      dataForm: {
        selectTime: null
        selectTime: null,
        exportTime: null
      },
      dataRule: {},
      dataRule: {
        exportTime:[{required:true,message:'导出日期不能为空',trigger:'change'}]
      },
      pickerOptions: {
        onPick: ({ maxDate, minDate }) => {
          if (minDate && this.pickerMinDate) {
@@ -323,6 +346,7 @@
          return false
        }
      },
      exportDialogVisible: false,
      syncDateVisible: false,
      syncDate: [],
      showCustomerorderReturn: false,
@@ -551,7 +575,7 @@
            minWidth: '120',
            width: '100px',
            prop: 'productType',
            label: '产品类型',
            label: '隶属品牌',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
@@ -811,6 +835,11 @@
    ...mapGetters(['permissions'])
  },
  watch: {
    exportDialogVisible(newVal){
      if(!newVal){
        this.$refs['exportForm'].resetFields()
      }
    },
    coState: {
      handler(newValue, oldValue) {
        if (newValue) {
@@ -1419,7 +1448,7 @@
                  '存在销售订单已关联工艺文件,如需更改,请先解除关联'
                )
              }
              if (item.salesPartNo == null || item.salesPartNo === '') {
              if (item.partNo == null || item.partNo === '') {
                status = true
                this.$message.error('存在销售订单未绑定销售件,请先绑定')
              }
@@ -1574,11 +1603,18 @@
      // } else {
      //   this.$message.error('请选择至少一条销售订单')
      // }
      exportCustomerOrder(this.$refs.customerOrderTable.getQueryParam())
        .then((response) => {
          transform(response)
        })
        .catch(() => {})
      this.$refs['exportForm'].validate(valid => {
        if(valid){
          const exportTime = this.dataForm.exportTime
          let queryParam=this.$refs.customerOrderTable.getQueryParam();
          queryParam.selectTime = exportTime
          exportCustomerOrder(queryParam)
            .then((response) => {
              transform(response)
            })
            .catch(() => {})
        }
      })
    },
    setSalesPart() {
      if (this.multipleSelection.length > 0) {