From 99494d05f34ad75fc82fd9a5355dbe6118a1639c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 18 十月 2023 11:12:29 +0800
Subject: [PATCH] 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
---
src/views/plan/customerorder/index.vue | 54 ++++++++++++++++++++++----
src/const/crud/customerOrder/customerOrderForm.js | 2
src/views/plan/customerorder/sample-customerorder-form.vue | 3 +
src/util/date.js | 17 ++++++++
src/views/plan/customerorder/customerorder-form.vue | 44 ++++++++++++---------
5 files changed, 90 insertions(+), 30 deletions(-)
diff --git a/src/const/crud/customerOrder/customerOrderForm.js b/src/const/crud/customerOrder/customerOrderForm.js
index 01f6355..f5080d1 100644
--- a/src/const/crud/customerOrder/customerOrderForm.js
+++ b/src/const/crud/customerOrder/customerOrderForm.js
@@ -68,7 +68,7 @@
minWidth: 200,
span: 24
}, {
- label: '浜у搧绫诲瀷',
+ label: '闅跺睘鍝佺墝',
prop: 'productType',
cell: true,
type: 'input',
diff --git a/src/util/date.js b/src/util/date.js
index 16ffed7..997017e 100644
--- a/src/util/date.js
+++ b/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
+}
\ No newline at end of file
diff --git a/src/views/plan/customerorder/customerorder-form.vue b/src/views/plan/customerorder/customerorder-form.vue
index 5eed5a3..c19dd65 100644
--- a/src/views/plan/customerorder/customerorder-form.vue
+++ b/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
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index c2a7289..cc8afa1 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/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) {
diff --git a/src/views/plan/customerorder/sample-customerorder-form.vue b/src/views/plan/customerorder/sample-customerorder-form.vue
index 00b1397..158385f 100644
--- a/src/views/plan/customerorder/sample-customerorder-form.vue
+++ b/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 = [{
--
Gitblit v1.9.3