From 2637821cb7466330f5c612be809531cb65790219 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 04 七月 2025 20:01:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue | 74 +++++++++++++++++++++++++++++++-----
1 files changed, 63 insertions(+), 11 deletions(-)
diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue
index 70b2c9d..ec5eb17 100644
--- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue
+++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue
@@ -7,7 +7,7 @@
<a-col :span="12">
<a-form-item label="璁惧缁�" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
- @search="deviceSearch" enter-button/>
+ @search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/>
</a-form-item>
</a-col>
@@ -39,15 +39,13 @@
</a-row>
</a-form>
</a-spin>
- <mdc-pass-rate-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></mdc-pass-rate-modal-list>
-
+ <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/>
</a-modal>
</template>
<script>
import moment from 'moment'
import pick from 'lodash.pick'
- import mdcPassRateModalList from './mdcPassRateModalList'
// import JDate from './JDate'
import {
getAction,
@@ -57,10 +55,11 @@
import {
duplicateCheck
} from '@/api/api'
+ import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer'
export default {
name: 'mdcPassRateModal',
- components: {mdcPassRateModalList},
+ components: { SelectDeviceDrawer},
props: {},
data() {
return {
@@ -113,6 +112,30 @@
{
required:true,
message: "璇烽�夋嫨璁惧"
+ },
+ ],
+ },
+ processQuantity:{
+ rules:[
+ {
+ required:true,
+ message: "璇疯緭鍏ュ姞宸ユ暟閲�"
+ },
+ ],
+ },
+ unqualifiedQuantity:{
+ rules:[
+ {
+ required:true,
+ message: "璇疯緭鍏ヤ笉鍚堟牸鏁伴噺"
+ },
+ ],
+ },
+ efficientDate:{
+ rules:[
+ {
+ required:true,
+ message: "璇烽�夋嫨鏃ユ湡"
},
],
},
@@ -173,9 +196,10 @@
// })
},
deviceSearch() {
- this.$refs.deviceRepairListModel.openPage()
- this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧'
- this.$refs.deviceRepairListModel.disableSubmit = false
+ this.$refs.selectDeviceDrawer.visible = true
+ this.$refs.selectDeviceDrawer.selectedRowKeys = []
+ this.$refs.selectDeviceDrawer.selectedRows = []
+ this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
},
//绾ц仈妗唎nChange浜嬩欢
// onChange(value) {
@@ -227,7 +251,11 @@
let stat = formData.processQuantity
let end = formData.unqualifiedQuantity
if(end>stat){
- that.$message.warning("涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�");
+ // that.$message.warning("涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�");
+ that.$notification.warning({
+ message:'娑堟伅',
+ description:"涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�"
+ });
that.confirmLoading = false
}else{
let obj
@@ -240,11 +268,19 @@
}
obj.then((res) => {
if (res.success) {
- that.$message.success("娣诲姞鎴愬姛")
+ // that.$message.success("娣诲姞鎴愬姛")
+ that.$notification.success({
+ message:'娑堟伅',
+ description:"娣诲姞鎴愬姛"
+ });
// that.$message.success(res.message)
that.$emit('ok', res.result)
} else {
- that.$message.warning(res.message)
+ // that.$message.warning(res.message)
+ that.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
}
}).finally(() => {
that.confirmLoading = false
@@ -311,6 +347,22 @@
},
checkboxChange(e) {
this.checked = e.target.checked
+ },
+
+ /**
+ * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
+ * @param data 宸查�夋嫨鐨勮澶�
+ */
+ selectOK(data) {
+ // let params = {}
+ // params.equipmentIdList = []
+ // for (var a = 0; a < data.length; a++) {
+ // params.equipmentIdList.push(data[a])
+ // }
+ console.log('data=', data)
+ this.form.setFieldsValue({
+ equipmentIds: data.join(',')
+ })
}
}
}
--
Gitblit v1.9.3