zouyu
2023-10-18 99494d05f34ad75fc82fd9a5355dbe6118a1639c
	modified:   src/const/crud/customerOrder/customerOrderForm.js
modified: src/util/date.js
modified: src/views/plan/customerorder/customerorder-form.vue
modified: src/views/plan/customerorder/index.vue
modified: src/views/plan/customerorder/sample-customerorder-form.vue
已修改5个文件
120 ■■■■ 文件已修改
src/const/crud/customerOrder/customerOrderForm.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/util/date.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/customerorder-form.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/index.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/sample-customerorder-form.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/const/crud/customerOrder/customerOrderForm.js
@@ -68,7 +68,7 @@
    minWidth: 200,
    span: 24
  }, {
    label: '产品类型',
    label: '隶属品牌',
    prop: 'productType',
    cell: true,
    type: 'input',
src/util/date.js
@@ -84,3 +84,20 @@
  year = (year + '').substring(2, 4)
  return year + month
}
/**
 * 获取年月日
 */
export function getYearAndMonthAndDays() {
  const date = new Date()
  let year = date.getFullYear()
  let month = date.getMonth() + 1
  if (month < 10) {
    month = '0' + month
  } else {
    month = month + '-'
  }
  year = year + '-'
  let days = date.getDate()
  return year + month + days
}
src/views/plan/customerorder/customerorder-form.vue
@@ -196,7 +196,7 @@
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="产品类型" prop="productType">
              <el-form-item label="隶属品牌" prop="productType">
                <el-input
                  v-model="dataForm.productType"
                  placeholder=""
@@ -255,28 +255,34 @@
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
          </el-row>
          <el-row>
            <!-- <el-col :span="6">
              <el-form-item label="质量要求" prop="qualityRequire">
            <el-col :span="6">
              <el-form-item label="单位" prop="otcUnit">
                <el-select
                  v-model="dataForm.otcUnit"
                  placeholder=""
                  filterable
                  style="width: 100%"
                >
                  <el-option
                    v-for="item in units"
                    :key="item.id"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="产品型号" prop="customerPartSpec">
                <el-input
                  v-model="dataForm.qualityRequire"
                  v-model="dataForm.customerPartSpec"
                  placeholder=""
                  disabled
                ></el-input>
              </el-form-item>
            </el-col> -->
            <!-- <el-col :span="6">
              <el-form-item label="生产需求说明" prop="otherProductRequire">
                <el-input
                  v-model="dataForm.otherProductRequire"
                  placeholder=""
                  disabled
                ></el-input>
              </el-form-item>
            </el-col> -->
            </el-col>
          </el-row>
          <el-row>
            <!-- <el-col :span="6">
              <el-form-item label="系统" prop="divisionSystem">
                <el-input
@@ -782,7 +788,6 @@
      showSynchronize: false,
      selectOrderParam: null,
      selectOrderObj: {},
      aaaaa:{},
      dataForm: {
        id: 0,
        sourceId: '',
@@ -1020,6 +1025,7 @@
            // } else {
            //   console.log('2')
            this.dataForm = response.data.data
            // }
            // this.fileList = response.data.data.customerOrderAttachmentList
            const sourceId = response.data.data.sourceId
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) {
@@ -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) {
src/views/plan/customerorder/sample-customerorder-form.vue
@@ -394,6 +394,7 @@
import { remote } from '@/api/admin/dict'
import PartDialog from '@/views/common/part.vue'
import { validateSixDecimal } from '@/util/validate'
import {dateFormat} from '@/util/date'
import { chooseStaff } from '@/api/admin/productType'
import { tableOption } from '@/const/crud/customerOrder/customerOrderForm'
@@ -480,7 +481,7 @@
      this.dataForm.isCp = null
      this.dataForm.customerNo = null
      this.dataForm.returnStatus = null
      this.dataForm.placeOrderDate = null
      this.dataForm.placeOrderDate = dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss')
      this.dataForm.factoryPlaceOrderDate = null
      this.dataForm.deliveryDate = null
      this.dataForm.customerOrderVOList = [{