问题修改

dev-scheduling
zhangdi 4 weeks ago
parent b6e3fc154e
commit 0a2d92c906
  1. 8
      src/api/basicData/assignConfigApprove.js
  2. 118
      src/views/approvalRecord/index.vue
  3. 24
      src/views/basicData/assignConfigApprove/index.vue
  4. 60
      src/views/inboundOutboundManagement/components/editMaterial.vue
  5. 13
      src/views/inboundOutboundManagement/materialIssuing.vue
  6. 11
      src/views/oem/oemOrderSettlement/components/inReview.vue
  7. 29
      src/views/oem/oemOrderSettlement/components/settlementAnomaly.vue
  8. 28
      src/views/oem/oemOrderSettlement/components/settlementCompleted.vue
  9. 8
      src/views/oem/oemOrderSettlement/components/settlementIn.vue
  10. 28
      src/views/oem/oemOrderSettlement/components/underReview.vue
  11. 43
      src/views/oem/oemOrderSettlement/components/unsettled.vue
  12. 31
      src/views/processManagement/components/processMainte/processPlanning.vue
  13. 527
      src/views/warehouseManagement/teamRequest/components/addEditDialog.vue
  14. 665
      src/views/warehouseManagement/teamRequest/index.vue

@ -58,3 +58,11 @@ export const submitAudit = (params) => {
params: params, params: params,
}); });
}; };
// 查询记录
export const auditHistory = (id) =>{
return request({
url:`/api/blade-desk/QA/DispatchConfigApproval/auditHistory/${id}`,
method:'get',
})
}

@ -0,0 +1,118 @@
<template>
<el-dialog
title="审批记录"
append-to-body
:modelValue="openShow"
width="50%"
@close="closeDialog"
>
<el-timeline class="horizontal-timeline">
<el-timeline-item
v-for="(activity, index) in rowData"
:key="index"
:timestamp="activity.time"
>
{{ activity.label }}{{ activity.value }}
</el-timeline-item>
</el-timeline>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
rowData: {
type: Array,
default: [],
},
},
data() {
return {
openShow: false,
};
},
mounted() {
this.openShow = this.showDialog;
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit('closeDialog');
},
submit() {
this.$refs.form.validate(async valid => {
if (valid) {
// let params = {
// id: this.$route.query.id,
// approvalStatus: '',
// };
// updateProcess(params).then((res) => {
// if (res.code == 200) {
// this.$message.success('');
// this.closeDialog();
// }
// });
}
});
},
},
};
</script>
<style lang="scss" scoped>
.horizontal-timeline {
display: flex;
justify-content: center; /* 关键:水平居中 */
align-items: center; /* 垂直居中(可选) */
flex-wrap: nowrap;
overflow-x: auto;
padding: 20px 0;
width: 100%; /* 确保占满容器宽度 */
// 线
::v-deep(.el-timeline-item__tail) {
display: none;
}
//
::v-deep(.el-timeline-item) {
display: flex;
flex-direction: column;
align-items: center;
min-width: 160px; //
padding: 0 12px;
flex-shrink: 0; /* 防止被压缩 */
}
::v-deep(.el-timeline-item__timestamp) {
position: static;
margin-top: 8px;
font-size: 12px;
color: #909399;
white-space: nowrap; /* 防止时间戳换行 */
}
::v-deep(.el-timeline-item__content) {
text-align: center;
padding: 8px 12px;
border-radius: 4px;
background-color: #f5f7fa;
min-height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
::v-deep(.el-timeline-item__node) {
margin-bottom: 8px;
}
}
</style>

@ -23,6 +23,9 @@
</template> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="text" v-if="permission.assignConfig_record" @click="recordFn(scope.row)"
>记录</el-button
>
<el-button <el-button
type="text" type="text"
v-if="permission.assignConfig_update && (scope.row.status == 0 || scope.row.status == 3)" v-if="permission.assignConfig_update && (scope.row.status == 0 || scope.row.status == 3)"
@ -69,24 +72,29 @@
:rowItem="rowItem" :rowItem="rowItem"
@closeDialog="closeDialog" @closeDialog="closeDialog"
></checkDialog> ></checkDialog>
<!-- 记录 -->
<approvalRecord v-if="approvalShow" :show-dialog="approvalShow" :rowData="rowData"></approvalRecord>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import addOrEditDialog from './addOrEditDialog.vue'; import addOrEditDialog from './addOrEditDialog.vue';
import checkDialog from './checkDialog.vue'; import checkDialog from './checkDialog.vue';
import { getList, del, submitApproval } from '@/api/basicData/assignConfigApprove'; import { getList, del, submitApproval, auditHistory } from '@/api/basicData/assignConfigApprove';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import approvalRecord from '@/views/approvalRecord/index.vue';
export default { export default {
components: { components: {
addOrEditDialog, addOrEditDialog,
checkDialog, checkDialog,
approvalRecord,
}, },
computed: { computed: {
...mapGetters(['permission']), ...mapGetters(['permission']),
}, },
data() { data() {
return { return {
approvalShow: false,
checkShow: false, checkShow: false,
showDialog: false, showDialog: false,
title: '新增', title: '新增',
@ -118,7 +126,7 @@ export default {
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
menuWidth: 160, menuWidth: 200,
dialogWidth: 900, dialogWidth: 900,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -212,9 +220,17 @@ export default {
data: [], data: [],
rowItem: {}, rowItem: {},
rowData:[],
}; };
}, },
methods: { methods: {
recordFn(row) {
auditHistory(row.id).then(res => {
this.approvalShow = true;
this.rowData = res.data.data
console.log(res.data);
});
},
addFn() { addFn() {
this.showDialog = true; this.showDialog = true;
this.title = '新增'; this.title = '新增';
@ -295,8 +311,8 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
if (!!params.applicationTimeArr) { if (!!params.applicationTimeArr) {
this.query.applicationTimeStart = params.applicationTimeArr[0]+' 00:00:00'; this.query.applicationTimeStart = params.applicationTimeArr[0] + ' 00:00:00';
this.query.applicationTimeEnd = params.applicationTimeArr[1]+' 23:59:59'; this.query.applicationTimeEnd = params.applicationTimeArr[1] + ' 23:59:59';
} }
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records; this.data = res.data.data.records;

@ -1,5 +1,33 @@
<template> <template>
<el-dialog title="出库" append-to-body :modelValue="openShow" fullscreen @close="closeDialog"> <el-dialog title="出库" append-to-body :modelValue="openShow" fullscreen @close="closeDialog">
<el-form
ref="ruleFormRef"
style="max-width: 300px"
:model="ruleForm"
:rules="rules"
label-width="auto"
>
<el-form-item label="领用人" prop="picker">
<jhSelect
v-model="ruleForm.picker"
placeholder="请搜索选择"
api-url="/blade-system/user/page"
echo-api="/blade-system/user/page"
echoParamsKey="ids"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="realName"
value-key="id"
search-key="realName"
:debounce-time="500"
@change="projectHeadChange"
:title="title"
:disabled="isDetail"
/>
</el-form-item>
</el-form>
<el-table :data="tableData" highlight-current-row @current-change="handleCurrentChange"> <el-table :data="tableData" highlight-current-row @current-change="handleCurrentChange">
<el-table-column label="提请物料" prop="goodsCode" align="center"></el-table-column> <el-table-column label="提请物料" prop="goodsCode" align="center"></el-table-column>
<el-table-column label="材料名称" prop="goodsName" align="center"></el-table-column> <el-table-column label="材料名称" prop="goodsName" align="center"></el-table-column>
@ -53,6 +81,15 @@ export default {
openShow: false, openShow: false,
tableData: [], tableData: [],
currentRow: null, currentRow: null,
ruleForm: {
picker: '',
pickerName:''
},
rules:{
picker: [
{ required: true, message: '请选择领用人', trigger: 'change' },
],
}
}; };
}, },
mounted() { mounted() {
@ -60,6 +97,9 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
projectHeadChange(value, item) {
this.ruleForm.pickerName = item.name
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentRow = val; this.currentRow = val;
}, },
@ -70,21 +110,29 @@ export default {
}, },
closeDialog(val) { closeDialog(val) {
this.openShow = false; this.openShow = false;
let query={ let query = {
...val, ...val,
index: this.checkIndex, index: this.checkIndex,
} ...this.ruleForm
};
this.$emit('closeDialog', query); this.$emit('closeDialog', query);
}, },
submit() { submit() {
console.log('this.currentRow', this.currentRow); console.log('this.currentRow', this.currentRow);
if (this.currentRow.currentOutQty >= 0) { if(this.currentRow==null){
this.closeDialog(this.currentRow); this.$message.error('请选择需要出库的数据');
return
}
if (this.currentRow.currentOutQty > 0) {
this.$refs.ruleFormRef.validate((validate) => {
if(validate){
this.closeDialog(this.currentRow);
}
});
} else { } else {
this.$message.error('请输入出库数量'); this.$message.error('请输入出库数量');
} }
}, },
}, },
}; };

@ -188,6 +188,7 @@ export default {
search: false, search: false,
}, },
{ {
label: '批次号', label: '批次号',
prop: 'piNo', prop: 'piNo',
@ -204,6 +205,14 @@ export default {
width: 150, width: 150,
search: false, search: false,
}, },
{
label: '领料人',
prop: 'pickerName',
span: 8,
overflow: true,
width: 150,
search: false,
},
{ {
label: '总库存', label: '总库存',
prop: 'currentStock', prop: 'currentStock',
@ -344,6 +353,8 @@ export default {
crId: row.id, crId: row.id,
currentOutQty: row.currentOutQty, currentOutQty: row.currentOutQty,
rlsId: row.rlsId, rlsId: row.rlsId,
// pickerName:row.pickerName,
picker:row.picker
}, },
]; ];
batchIssue(query).then(res => { batchIssue(query).then(res => {
@ -423,6 +434,8 @@ export default {
this.data[val.index].piNo = val.piNo; this.data[val.index].piNo = val.piNo;
this.data[val.index].currentOutQty = val.currentOutQty; this.data[val.index].currentOutQty = val.currentOutQty;
this.data[val.index].rlsId = val.id; this.data[val.index].rlsId = val.id;
this.data[val.index].picker = val.picker
this.data[val.index].pickerName = val.pickerName
}, },
onLoad() { onLoad() {

@ -72,7 +72,7 @@ export default {
editBtnIcon: ' ', editBtnIcon: ' ',
viewBtnText: '详情', viewBtnText: '详情',
labelWidth: 120, labelWidth: 120,
searchLabelWidth:90, searchLabelWidth:'auto',
menuWidth: 100, menuWidth: 100,
dialogWidth: 640, dialogWidth: 640,
dialogClickModal: false, dialogClickModal: false,
@ -139,7 +139,7 @@ export default {
label: '审核状态', label: '审核状态',
prop: 'approvalStatus', prop: 'approvalStatus',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
width: 120, width: 120,
search:true, search:true,
@ -171,7 +171,7 @@ export default {
label: '提交人', label: '提交人',
prop: 'createUserName', prop: 'createUserName',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
width: 120, width: 120,
}, },
@ -179,7 +179,7 @@ export default {
label: '提交时间', label: '提交时间',
prop: 'submitTime', prop: 'submitTime',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
width: 150, width: 150,
}, },
@ -292,6 +292,9 @@ export default {
} }
approvalList(params).then(res =>{ approvalList(params).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.data.forEach(item =>{
item.ppsId = item.ppsId?item.ppsId+'':''
})
this.page.total = res.data.data.total this.page.total = res.data.data.total
this.loading = false this.loading = false
}) })

@ -6,7 +6,7 @@
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange"> @refresh-change="refreshChange">
<template #menu-left> <template #menu-left>
<el-form ref="form" :model="form" label-width="100px" :inline="true"> <el-form ref="form" :model="form" label-width="auto" :inline="true">
<el-form-item label="现执行价格:"> <el-form-item label="现执行价格:">
<el-input v-model="form.price"></el-input> <el-input v-model="form.price"></el-input>
</el-form-item> </el-form-item>
@ -87,6 +87,7 @@ export default {
delBtnIcon: ' ', delBtnIcon: ' ',
editBtnIcon: ' ', editBtnIcon: ' ',
align: 'center', align: 'center',
searchLabelWidth: 'auto',
column: [ column: [
{ {
label: '计划单号', label: '计划单号',
@ -157,7 +158,7 @@ export default {
label: '工序', label: '工序',
prop: 'psId', prop: 'psId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -175,7 +176,7 @@ export default {
label: '工艺能力', label: '工艺能力',
prop: 'caId', prop: 'caId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
searchOrder:9, searchOrder:9,
@ -186,6 +187,17 @@ export default {
label:"caName", label:"caName",
value:"id" value:"id"
}, },
},
{
label: '结算大类',
prop: 'statementCategory',
sortable: 'custom',
filter: true,
span: 24,
search: true,
width: 120,
searchOrder:19,
}, },
{ {
label: '流程卡号', label: '流程卡号',
@ -330,13 +342,13 @@ export default {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
searchOrder:16, searchOrder:20,
}, },
{ {
label: '异常原因', label: '异常原因',
prop: 'memo', prop: 'memo',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -403,7 +415,7 @@ export default {
label: '结算状态', label: '结算状态',
prop: 'rosStatusList', prop: 'rosStatusList',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -423,7 +435,7 @@ export default {
label: '外协厂商', label: '外协厂商',
prop: 'ocId', prop: 'ocId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
hide: true, hide: true,
@ -613,6 +625,9 @@ export default {
if(params.putStoreTime) delete params.putStoreTime; if(params.putStoreTime) delete params.putStoreTime;
getStatement(params).then(res =>{ getStatement(params).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.data.forEach(item =>{
item.ppsId = item.ppsId?item.ppsId+'':''
})
this.page.total = res.data.data.total this.page.total = res.data.data.total
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {

@ -60,7 +60,6 @@ export default {
editBtnIcon: ' ', editBtnIcon: ' ',
viewBtnText: '详情', viewBtnText: '详情',
labelWidth: 120, labelWidth: 120,
searchLabelWidth:90,
menuWidth: 180, menuWidth: 180,
dialogWidth: 640, dialogWidth: 640,
dialogClickModal: false, dialogClickModal: false,
@ -82,6 +81,7 @@ export default {
delBtnIcon: ' ', delBtnIcon: ' ',
editBtnIcon: ' ', editBtnIcon: ' ',
align: 'center', align: 'center',
searchLabelWidth:'auto',
column: [ column: [
{ {
label: '计划单号', label: '计划单号',
@ -151,7 +151,7 @@ export default {
label: '工序', label: '工序',
prop: 'ppsId', prop: 'ppsId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -170,7 +170,7 @@ export default {
prop: 'caId', prop: 'caId',
type:"select", type:"select",
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -180,6 +180,17 @@ export default {
value:"id" value:"id"
}, },
searchOrder:9, searchOrder:9,
},
{
label: '结算大类',
prop: 'statementCategory',
sortable: 'custom',
filter: true,
span: 24,
search: true,
width: 120,
searchOrder:19,
}, },
{ {
label: '厂家代码', label: '厂家代码',
@ -324,7 +335,7 @@ export default {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
searchOrder:12, searchOrder:20,
}, },
{ {
@ -425,7 +436,7 @@ export default {
label: '外协厂商', label: '外协厂商',
prop: 'ocId', prop: 'ocId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: false, search: false,
hide: true, hide: true,
@ -443,7 +454,7 @@ export default {
label: '结算状态', label: '结算状态',
prop: 'rosStatusList', prop: 'rosStatusList',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -467,7 +478,7 @@ export default {
label: '外协厂商', label: '外协厂商',
prop: 'ocIds', prop: 'ocIds',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -630,6 +641,9 @@ export default {
if(params.putStoreTime) delete params.putStoreTime; if(params.putStoreTime) delete params.putStoreTime;
getStatement(params).then(res =>{ getStatement(params).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.data.forEach(item =>{
item.ppsId = item.ppsId?item.ppsId+'':''
})
this.page.total = res.data.data.total this.page.total = res.data.data.total
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {

@ -76,6 +76,7 @@ export default {
delBtnIcon: ' ', delBtnIcon: ' ',
editBtnIcon: ' ', editBtnIcon: ' ',
align: 'center', align: 'center',
searchMenuWidth: 'auto',
column: [ column: [
{ {
label: '外协单号', label: '外协单号',
@ -131,7 +132,7 @@ export default {
label: '生产标识', label: '生产标识',
prop: 'prodIdent', prop: 'prodIdent',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -147,7 +148,7 @@ export default {
label: '工序', label: '工序',
prop: 'psCode', prop: 'psCode',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -168,6 +169,7 @@ export default {
span: 24, span: 24,
search: false, search: false,
width: 120, width: 120,
searchOrder:19,
}, },
{ {
label: '镀后入库时间', label: '镀后入库时间',
@ -218,7 +220,7 @@ export default {
label: '外协厂商', label: '外协厂商',
prop: 'ocId', prop: 'ocId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,

@ -105,7 +105,7 @@ export default {
editBtnIcon: ' ', editBtnIcon: ' ',
viewBtnText: '详情', viewBtnText: '详情',
labelWidth: 120, labelWidth: 120,
searchLabelWidth:90, searchLabelWidth:'auto',
menuWidth: 180, menuWidth: 180,
dialogWidth: 640, dialogWidth: 640,
dialogClickModal: false, dialogClickModal: false,
@ -196,7 +196,7 @@ export default {
label: '工序', label: '工序',
prop: 'ppsId', prop: 'ppsId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -213,9 +213,9 @@ export default {
label: '工艺能力', label: '工艺能力',
prop: 'caId', prop: 'caId',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: false,
searchOrder:8, searchOrder:8,
width: 120, width: 120,
type:'select', type:'select',
@ -224,6 +224,17 @@ export default {
label:"caName", label:"caName",
value:"id" value:"id"
}, },
},
{
label: '结算大类',
prop: 'statementCategory',
sortable: 'custom',
filter: true,
span: 24,
search: true,
width: 120,
searchOrder:19,
}, },
{ {
label: '厂家代码', label: '厂家代码',
@ -367,7 +378,7 @@ export default {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
searchOrder:11, searchOrder:20,
}, },
{ {
label: '报价单号', label: '报价单号',
@ -437,7 +448,7 @@ export default {
label: '结算状态', label: '结算状态',
prop: 'rosStatusList', prop: 'rosStatusList',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -461,7 +472,7 @@ export default {
label: '外协厂商', label: '外协厂商',
prop: 'ocIds', prop: 'ocIds',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -596,6 +607,9 @@ export default {
if(params.putStoreTime) delete params.putStoreTime if(params.putStoreTime) delete params.putStoreTime
getStatement(params).then(res =>{ getStatement(params).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.data.forEach(item =>{
item.ppsId = item.ppsId?item.ppsId+'':''
})
this.page.total = res.data.data.total this.page.total = res.data.data.total
this.loading = false this.loading = false
}) })

@ -7,7 +7,7 @@
@refresh-change="refreshChange" @sort-change="sortChange"> @refresh-change="refreshChange" @sort-change="sortChange">
<!-- @on-load="onLoad" --> <!-- @on-load="onLoad" -->
<template #menu-left> <template #menu-left>
<el-form ref="form" :model="form" label-width="100px" :inline="true"> <el-form ref="form" :model="form" label-width="auto" :inline="true">
<el-form-item label="现执行价格:"> <el-form-item label="现执行价格:">
<el-input v-model="form.price"></el-input> <el-input v-model="form.price"></el-input>
</el-form-item> </el-form-item>
@ -156,6 +156,7 @@ export default {
delBtnIcon: ' ', delBtnIcon: ' ',
editBtnIcon: ' ', editBtnIcon: ' ',
align: 'center', align: 'center',
searchLabelWidth:'auto',
column: [ column: [
{ {
// label: '', // label: '',
@ -236,7 +237,7 @@ export default {
label: '工序', label: '工序',
prop: 'ppsId', prop: 'ppsId',
// sortable: 'custom', // sortable: 'custom',
filter: true, filterable: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
@ -250,21 +251,32 @@ export default {
searchOrder:9, searchOrder:9,
}, },
// {
// label: '',
// prop: 'caId',
// type:"select",
// sortable: 'custom',
// filterable: true,
// span: 24,
// search: true,
// width: 120,
// dicUrl:"/api/blade-desk/BA/craftAbility/findList",
// props:{
// label:"caName",
// value:"id"
// },
// searchOrder:8,
// },
{ {
label: '工艺能力', label: '结算大类',
prop: 'caId', prop: 'statementCategory',
type:"select",
sortable: 'custom', sortable: 'custom',
filter: true, filter: true,
span: 24, span: 24,
search: true, search: true,
width: 120, width: 120,
dicUrl:"/api/blade-desk/BA/craftAbility/findList", searchOrder:19,
props:{
label:"caName",
value:"id"
},
searchOrder:8,
}, },
{ {
label: '厂家代码', label: '厂家代码',
@ -405,7 +417,7 @@ export default {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
searchOrder:11, searchOrder:20,
}, },
{ {
label: '结算状态', label: '结算状态',
@ -430,7 +442,7 @@ export default {
label: '结算状态', label: '结算状态',
prop: 'rosStatusList', prop: 'rosStatusList',
sortable: true, sortable: true,
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -451,7 +463,7 @@ export default {
label: '外协厂商', label: '外协厂商',
prop: 'ocIds', prop: 'ocIds',
sortable: 'custom', sortable: 'custom',
filter: true, filterable: true,
span: 24, span: 24,
hide: true, hide: true,
search: true, search: true,
@ -757,6 +769,9 @@ export default {
if(params.putStoreTime) delete params.putStoreTime if(params.putStoreTime) delete params.putStoreTime
getStatement(params).then(res =>{ getStatement(params).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.data.forEach(item =>{
item.ppsId = item.ppsId?item.ppsId+'':''
})
this.page.total = res.data.data.total this.page.total = res.data.data.total
this.loading = false this.loading = false
}) })

@ -106,7 +106,7 @@
<el-button type="primary" @click="saveInfo()" :loading="craftLoading">保存</el-button> <el-button type="primary" @click="saveInfo()" :loading="craftLoading">保存</el-button>
</div> </div>
<div class="table-btn-right" v-if="activeName == '1'"> <div class="table-btn-right" v-if="activeName == '1'">
<el-select <!-- <el-select
v-model="modelLevel" v-model="modelLevel"
placeholder="选择工艺模板" placeholder="选择工艺模板"
style="width: 220px; margin-right: 12px" style="width: 220px; margin-right: 12px"
@ -120,7 +120,18 @@
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select> -->
<el-cascader
v-model="modelLevel"
:options="filteredList"
:props="{ expandTrigger: 'hover' }"
placeholder="选择工艺模板"
style="width: 220px; margin-right: 12px"
clearable
filterable
:filter-method="handleFilter"
></el-cascader>
<el-button type="primary" @click="modelLevelChange()" :loading="modelLevelLoading" <el-button type="primary" @click="modelLevelChange()" :loading="modelLevelLoading"
>导入模板</el-button >导入模板</el-button
> >
@ -506,7 +517,7 @@ import {
} from '@/api/processManagement/taskProcessing'; } from '@/api/processManagement/taskProcessing';
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem';
import { getDictionary } from '@/api/system/dict'; import { getDictionary } from '@/api/system/dict';
import {craftBatchCopy} from '@/api/processManagement/procepssPlanning'; import { craftBatchCopy } from '@/api/processManagement/procepssPlanning';
export default { export default {
name: 'CraftIndex', name: 'CraftIndex',
components: {}, components: {},
@ -751,7 +762,18 @@ export default {
// //
async getModelList() { async getModelList() {
await getModelList().then(res => { await getModelList().then(res => {
this.modelOption = res.data.data; let data_ = res.data.data;
data_.forEach(item => {
item.label = item.platingTypeStr;
if(item.children.length>0){
item.children.forEach(item_=>{
item_.label = item_.name;
item_.value = item_.id;
})
}
});
this.modelOption = data_;
this.filteredList = [...this.modelOption]; this.filteredList = [...this.modelOption];
}); });
}, },
@ -1154,7 +1176,6 @@ export default {
craftBatchCopy(query).then(res => { craftBatchCopy(query).then(res => {
this.$message.success('复制成功'); this.$message.success('复制成功');
}); });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({

@ -1,274 +1,275 @@
<template> <template>
<el-dialog title="新增" append-to-body :modelValue="openShow" width="70%" @close="closeDialog" fullscreen> <el-dialog
<!-- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> title="新增"
<el-row :gutter="24"> append-to-body
:modelValue="openShow"
<el-col :span="8"> width="70%"
<el-form-item label="申报人" prop="userId"> @close="closeDialog"
<el-select v-model="ruleForm.userId" placeholder="请选择" disabled> fullscreen
<el-option label="申报人一" value="1"> >
</el-option> <div style="margin-bottom: 12px" v-if="moldAddMore">
<el-option label="申报人二" value="2"> <el-button type="primary" @click="addTable">插入一行</el-button>
</el-option> <el-button type="danger" @click="handleDelete">删除行</el-button>
</el-select> </div>
</el-form-item> <el-table
</el-col> :data="tableData"
:height="tableHeight"
<el-col :span="8"> style="width: 100%"
<el-form-item label="申报日期" prop="declareDate"> @select="selectChange"
<el-date-picker v-model="ruleForm.declareDate" type="date" placeholder="选择日期" border
style="width: 100%;"> >
</el-date-picker> <el-table-column type="selection" width="55"></el-table-column>
</el-form-item> <el-table-column prop="goodsId" label="物料编号" align="center">
</el-col> <template #header>
<el-col :span="8"> <span><i style="color: red">*</i>物料编号</span>
<el-form-item label="需求日期" prop="needDate"> </template>
<el-date-picker v-model="ruleForm.needDate" type="date" placeholder="选择日期" style="width: 100%;"> <template #default="scope">
</el-date-picker> <jhSelect
</el-form-item> v-model="scope.row.goodsCode"
</el-col> placeholder="请搜索选择"
<el-col :span="8"> api-url="/blade-wms/stGoods/list"
<el-form-item label="采购部门" prop="buyDept"> echo-api="/blade-wms/stGoods/list"
<el-select v-model="ruleForm.buyDept" placeholder="请选择"> echoParamsKey="goodsCode"
<el-option label="采购部门一" value="1"> echo-method="get"
</el-option> api-method="get"
<el-option label="采购部门二" value="2"> list-key="records"
</el-option> total-key="total"
</el-select> label-key="goodsCode"
</el-form-item> value-key="goodsCode"
</el-col> search-key="goodsCode"
<el-col :span="8"> :debounce-time="100"
<el-form-item label="需求部门" prop="needDept"> @change="(val, item) => changeGoods(val, item, scope.row, scope.$index)"
<el-select v-model="ruleForm.needDept" placeholder="请选择"> />
<el-option label="需求部门一" value="1"> </template>
</el-option> </el-table-column>
<el-option label="需求部门二" value="2"> <el-table-column prop="goodsName" label="物料名称" align="center"></el-table-column>
</el-option> <el-table-column prop="materialModel" label="型号/牌号" align="center"></el-table-column>
</el-select> <el-table-column prop="specifications" label="物料规格" align="center"></el-table-column>
</el-form-item>
</el-col>
</el-row>
</el-form> -->
<div style="margin-bottom: 12px;" v-if="moldAddMore">
<el-button type="primary" @click="addTable">插入一行</el-button>
<el-button type="danger" @click="handleDelete">删除行</el-button>
</div>
<el-table :data="tableData" style="width: 100%" @select="selectChange" border>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="goodsId" label="物料编号" align="center">
<template #header>
<span><i style="color:red">*</i>物料编号</span>
</template>
<template #default="scope">
<!-- <el-select v-model="scope.row.goodsCode" placeholder="请选择" style="width: 100%"
@change="(val) => changeGoods(val,scope.$index)">
<el-option v-for="item in goodsList" :key="item.id" :label="item.goodsCode" :value="item.goodsCode"></el-option>
</el-select> -->
<jhSelect
v-model="scope.row.goodsCode"
placeholder="请搜索选择"
api-url="/blade-wms/stGoods/list"
echo-api="/blade-wms/stGoods/list"
echoParamsKey="goodsCode"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="goodsCode"
value-key="goodsCode"
search-key="goodsCode"
:debounce-time="100"
@change="(val, item) => changeGoods(val, item, scope.row, scope.$index)"
/>
</template>
</el-table-column>
<el-table-column prop="goodsName" label="物料名称" align="center"></el-table-column>
<el-table-column prop="materialModel" label="型号/牌号" align="center"></el-table-column>
<el-table-column prop="specifications" label="物料规格" align="center"></el-table-column>
<el-table-column prop="currentQuantity" label="库存数量" align="center"></el-table-column>
<el-table-column prop="avlQuantity" label="可用数量" align="center"></el-table-column>
<el-table-column prop="quantity" label="提请数量" align="center">
<template #header>
<span><i style="color:red">*</i>提请数量</span>
</template>
<template #default="scope">
<el-input-number v-model="scope.row.quantity" :min="1" controls-position="right" @change="handleChange"
style="width: 100%" />
</template>
</el-table-column>
<el-table-column prop="woCode" label="关联订单号" align="center">
<template #default="scope">
<el-input v-model="scope.row.woCode" style="width: 100%" placeholder="请输入" />
</template>
</el-table-column>
<el-table-column prop="memo" label="备注" align="center">
<template #default="scope">
<el-input v-model="scope.row.memo" style="width: 100%" placeholder="请输入" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="40">
<template #default="scope">
<el-button link type="primary" size="small" @click.prevent="delTable(scope.row, scope.$index)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer> <el-table-column prop="currentQuantity" label="库存数量" align="center"></el-table-column>
<span class="dialog-footer"> <el-table-column prop="avlQuantity" label="可用数量" align="center"></el-table-column>
<el-button @click="closeDialog"> </el-button> <el-table-column prop="quantity" label="提请数量" align="center">
<el-button type="primary" @click="submit"> </el-button> <template #header>
</span> <span><i style="color: red">*</i>提请数量</span>
</template>
<template #default="scope">
<el-input-number
v-model="scope.row.quantity"
:min="1"
controls-position="right"
@change="handleChange"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column prop="woCode" label="关联订单号" align="center">
<template #default="scope">
<el-input v-model="scope.row.woCode" style="width: 100%" placeholder="请输入" />
</template>
</el-table-column>
<el-table-column prop="memo" label="备注" align="center">
<template #default="scope">
<el-input v-model="scope.row.memo" style="width: 100%" placeholder="请输入" />
</template> </template>
</el-dialog> </el-table-column>
<el-table-column prop="approver" label="审批人" align="center">
<template #header>
<span><i style="color: red">*</i>审批人</span>
</template>
<template #default="scope">
<el-select
v-model="scope.row.approver"
clearable
filterable
placeholder="请选择"
style="width: 100%"
@change="val => handleApproverChange(val, scope.row, scope.$index)"
>
<el-option
v-for="item in approverList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="40">
<template #default="scope">
<el-button
link
type="primary"
size="small"
@click.prevent="delTable(scope.row, scope.$index)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog" :loading="submitLoading"> </el-button>
<el-button type="primary" @click="submit" :loading="submitLoading"> </el-button>
</span>
</template>
</el-dialog>
</template> </template>
<script> <script>
import {getMaterialList,addRequests} from "@/api/storeManagement/teamRequest" import { getMaterialList, addRequests } from '@/api/storeManagement/teamRequest';
import { getUserByRoleAlias } from '@/api/storeManagement/warehouseMaintenance';
export default { export default {
props: { props: {
showDialog: { showDialog: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
moldAddMore: { moldAddMore: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
buyCycle: { buyCycle: {
type: Number, type: Number,
default: 0 default: 0,
} },
},
data() {
return {
openShow: false,
ruleForm: {
userId: '1',
declareDate: '',
needDate: '',
buyDept: '',
needDept: null,
},
rules: {
userId: [{ required: true, message: '请选择', trigger: 'blur' }],
declareDate: [{ required: true, message: '请选择', trigger: 'blur' }],
needDate: [{ required: true, message: '请选择', trigger: 'blur' }],
buyDept: [{ required: true, message: '请选择', trigger: 'blur' }],
needDept: [{ required: true, message: '请选择', trigger: 'blur' }],
approver: [{ required: true, message: '请选择', trigger: 'blur' }],
},
tableData: [],
boCode: 'BO-2025001',
goodsList: [],
tableHeight: 0,
approverList: [], //
submitLoading: false,
};
},
mounted() {
this.openShow = this.showDialog;
this.getApproverList();
this.getMaterialList();
this.$nextTick(() => {
this.calcTableHeight();
});
window.addEventListener('resize', this.calcTableHeight);
},
beforeDestroy() {
window.removeEventListener('resize', this.calcTableHeight);
},
methods: {
getApproverList() {
getUserByRoleAlias({ roleAlias: 'sj_craft,rb_craft' }).then(res => {
this.approverList = res.data.data;
});
},
handleApproverChange(val, row, index) {
const selectedItem = this.approverList.find(item => item.id === val);
const label = selectedItem ? selectedItem.name : '';
this.tableData[index].approverName = label;
},
calcTableHeight() {
const headerHeight = 50; //
const footerHeight = 60; // footer
const padding = 40; // padding
this.tableHeight = window.innerHeight - headerHeight - footerHeight - padding - 40;
},
changeGoods(val, item, row, index) {
if (item != undefined) {
this.tableData[index].goodsName = item.goodsName;
this.tableData[index].goodsId = item.id;
this.tableData[index].specifications = item.specifications;
this.tableData[index].currentQuantity = item.currentQuantity;
this.tableData[index].materialModel = item.materialModel;
this.tableData[index].avlQuantity = item.avlQuantity;
}
},
getMaterialList() {
getMaterialList().then(res => {
this.goodsList = res.data.data.records;
});
},
closeDialog(val) {
this.openShow = false;
this.$emit('closeDialog', val);
},
//
addTable() {
let boCode = '';
const len = this.tableData;
if (len.length === 0) {
boCode = this.boCode;
} else {
const newBoCode = len[len.length - 1].boCode;
const codeArr = newBoCode.split('-');
const num = Number(codeArr[1]) + 1;
boCode = codeArr[0] + '-' + num;
}
//
const record = { _select: false, boCode, buyCycle: this.buyCycle, planArea: '洛阳新区' };
this.tableData.push(record);
},
selectChange(list, row) {
row._select = !row._select;
},
handleDelete() {
let tmp = this.tableData.find(item => item._select === true);
if (!tmp) {
this.$message.error('请先选择数据');
return;
}
this.$confirm('确定删除数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
this.tableData = this.tableData.filter(row => !row._select);
});
}, },
data() { //
return { delTable(row, index) {
openShow: false, this.$confirm('确定删除数据吗?', {
ruleForm: { confirmButtonText: '确定',
userId: '1', cancelButtonText: '取消',
declareDate: '', type: 'warning',
needDate: '', }).then(() => {
buyDept: '', this.tableData.splice(index, 1);
needDept: null, });
},
rules: {
userId: [
{ required: true, message: '请选择', trigger: 'blur' },
],
declareDate: [
{ required: true, message: '请选择', trigger: 'blur' },
],
needDate: [
{ required: true, message: '请选择', trigger: 'blur' },
],
buyDept: [
{ required: true, message: '请选择', trigger: 'blur' },
],
needDept: [
{ required: true, message: '请选择', trigger: 'blur' },
],
},
tableData: [],
boCode: 'BO-2025001',
goodsList:[]
}
}, },
mounted() { submit() {
this.openShow = this.showDialog if (this.tableData.length == 0) {
this.getMaterialList() this.$message.error('请至少添加数据');
return;
}
this.submitLoading = true;
addRequests(this.tableData)
.then(res => {
if (res.data.code == 200) {
this.$message.success('新增成功');
this.closeDialog(true);
this.submitLoading = false;
}
})
.catch(err => {
this.submitLoading = false;
});
}, },
methods: { },
changeGoods(val, item, row, index){ };
console.log(val, item, row, index);
if (item != undefined) {
this.tableData[index].goodsName = item.goodsName;
this.tableData[index].goodsId = item.id
this.tableData[index].specifications = item.specifications;
this.tableData[index].currentQuantity = item.currentQuantity
this.tableData[index].materialModel = item.materialModel;
this.tableData[index].avlQuantity = item.avlQuantity
}
// let tmp = this.goodsList.find(item => item.goodsCode == val)
// this.tableData[index].goodsName = tmp.goodsName
// this.tableData[index].goodsId = tmp.id
// this.tableData[index].materialModel = tmp.materialModel
// this.tableData[index].specifications = tmp.specifications
// this.tableData[index].currentQuantity = tmp.currentQuantity
// this.tableData[index].avlQuantity = tmp.avlQuantity
},
getMaterialList(){
getMaterialList().then(res => {
this.goodsList = res.data.data.records
})
},
closeDialog(val) {
this.openShow = false
this.$emit('closeDialog',val);
},
//
addTable() {
let boCode = '';
const len = this.tableData;
if (len.length === 0) {
boCode = this.boCode;
} else {
const newBoCode = len[len.length - 1].boCode;
const codeArr = newBoCode.split('-');
const num = Number(codeArr[1]) + 1;
boCode = codeArr[0] + '-' + num;
}
//
const record = { _select:false, boCode, buyCycle: this.buyCycle, planArea: '洛阳新区' };
this.tableData.push(record)
},
selectChange(list, row) {
row._select = !row._select;
},
handleDelete(){
let tmp = this.tableData.find(item => item._select === true);
if(!tmp){
this.$message.error('请先选择数据');
return
}
this.$confirm('确定删除数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
this.tableData = this.tableData.filter(row => !row._select);
})
},
//
delTable(row, index) {
this.$confirm('确定删除数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
this.tableData.splice(index, 1)
})
},
submit(){
if(this.tableData.length == 0){
this.$message.error('请至少添加数据');
return
}
console.log('提交数据:', this.tableData);
addRequests(this.tableData).then(res =>{
if(res.data.code == 200){
this.$message.success('新增成功')
this.closeDialog(true)
}
})
},
}
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

@ -1,362 +1,323 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" <avue-crud
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" :option="option"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" :table-loading="loading"
@refresh-change="refreshChange" @on-load="onLoad"> :data="data"
<template #menu-left> v-model="form"
<el-button type="primary" @click="handleAdd">新增 v-model:page="page"
</el-button> ref="crud"
<el-button type="danger" @click="handleDelete">删除 @row-del="rowDel"
</el-button> @search-change="searchChange"
</template> @search-reset="searchReset"
<template #menu="scope"> @selection-change="selectionChange"
<el-button type="text" @click="handeExamine(scope.row)" v-if="scope.row.approvalStatus == 0">审批</el-button> @current-change="currentChange"
</template> @size-change="sizeChange"
<template #menu-right> @refresh-change="refreshChange"
<!-- <el-button type="success" icon="el-icon-upload" @click="handleImport">导入 @on-load="onLoad"
>
<template #menu-left>
<el-button type="primary" @click="handleAdd">新增 </el-button>
<el-button type="danger" @click="handleDelete">删除 </el-button>
</template>
<template #menu="scope">
<el-button type="text" @click="handeExamine(scope.row)" v-if="scope.row.approvalStatus == 0"
>审批</el-button
>
</template>
<template #menu-right>
<!-- <el-button type="success" icon="el-icon-upload" @click="handleImport">导入
</el-button> --> </el-button> -->
</template> </template>
</avue-crud>
</avue-crud> <addEditDialog
<addEditDialog v-if="isOpen" :showDialog="isOpen" @closeDialog="closeDialog" :moldAddMore="moldAddMore"> v-if="isOpen"
</addEditDialog> :showDialog="isOpen"
<el-dialog width="30%" v-model="approveDialog" title="审批"> @closeDialog="closeDialog"
<el-form :model="auditForm" :rules="auditRules" ref="auditForm"> :moldAddMore="moldAddMore"
<el-form-item label="是否审核通过" prop="approvalResult"> >
<el-radio v-model="auditForm.approvalResult" label="1"></el-radio> </addEditDialog>
<el-radio v-model="auditForm.approvalResult" label="10"></el-radio> <el-dialog width="30%" v-model="approveDialog" title="审批">
</el-form-item> <el-form :model="auditForm" :rules="auditRules" ref="auditForm">
</el-form> <el-form-item label="是否审核通过" prop="approvalResult">
<template #footer> <el-radio v-model="auditForm.approvalResult" label="1"></el-radio>
<span class="dialog-footer"> <el-radio v-model="auditForm.approvalResult" label="10"></el-radio>
<el-button @click="approveDialog = false"> </el-button> </el-form-item>
<el-button type="primary" @click="submit"> </el-button> </el-form>
</span> <template #footer>
</template> <span class="dialog-footer">
</el-dialog> <el-button @click="approveDialog = false"> </el-button>
</basic-container> <el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</basic-container>
</template> </template>
<script> <script>
import {getList,delRequests,approve} from "@/api/storeManagement/teamRequest" import { getList, delRequests, approve } from '@/api/storeManagement/teamRequest';
import addEditDialog from './components/addEditDialog.vue' import addEditDialog from './components/addEditDialog.vue';
export default { export default {
components: { addEditDialog }, components: { addEditDialog },
data() { data() {
return { return {
selectionList: [], selectionList: [],
loading:false, loading: false,
option: { option: {
height: 'auto', height: 'auto',
calcHeight: 32, calcHeight: 32,
tip: false, tip: false,
// size: 'medium', simplePage: true,
simplePage: true, searchShow: true,
searchShow: true, searchMenuSpan: 6,
searchMenuSpan: 6, searchIcon: true,
searchIcon: true, searchIndex: 3,
searchIndex: 3, tree: false,
tree: false, border: true,
border: true, index: true,
index: true, selection: true,
selection: true, viewBtn: false,
viewBtn: false, delBtn: false,
delBtn: false, addBtn: false,
addBtn: false, editBtnText: '修改',
editBtnText: '修改', addBtnIcon: ' ',
addBtnIcon: ' ', viewBtnIcon: ' ',
viewBtnIcon: ' ', delBtnIcon: ' ',
delBtnIcon: ' ', editBtnIcon: ' ',
editBtnIcon: ' ', viewBtnText: '详情',
viewBtnText: '详情', labelWidth: 120,
labelWidth: 120, menuWidth: 80,
menuWidth: 80, dialogWidth: 1040,
dialogWidth: 1040, dialogClickModal: false,
dialogClickModal: false, searchEnter: true,
searchEnter: true, excelBtn: false,
excelBtn: false, filterBtn: true,
filterBtn: true, searchShowBtn: false,
searchShowBtn: false, columnSort: true,
columnSort: true, excelBtn: true,
excelBtn: true, columnSort: true,
columnSort: true, index: false,
index: false, showOverflowTooltip: true,
showOverflowTooltip: true, menu: true,
menu: true, searchLabelPosition: 'left',
searchLabelPosition: 'left', searchLabelWidth: 'auto',
searchLabelWidth: 'auto', searchGutter: 24,
searchGutter: 24, searchSpan: 6,
searchSpan: 6, menuAlign: 'center',
menuAlign: 'center', gridBtn: false,
gridBtn: false, searchMenuPosition: 'right',
searchMenuPosition: 'right', align: 'center',
align: 'center', editBtn: false,
editBtn:false, searchLabelWidth: 'auto',
column: [ column: [
{ {
label: '提请单号', label: '提请单号',
prop: 'crCode', prop: 'crCode',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
width:180, width: 180,
search: false, search: false,
searchOrder: 19, searchOrder: 19,
rules: [ },
{ {
required: true, label: '物料编号',
message: '请输入提请单号', prop: 'goodsCode',
trigger: 'blur', search: true,
}, sortable: true,
], filter: true,
}, width: 140,
{ span: 12,
label: '物料编号', searchOrder: 20,
prop: 'goodsCode', },
search: true, {
sortable: true, label: '物料名称',
filter: true, prop: 'goodsName',
width:180, search: false,
span: 12, sortable: true,
searchOrder: 20, filter: true,
// dicData: [ span: 12,
// { width: 140,
// label: '' },
// }, {
// { label: '规格',
// label: '' prop: 'specifications',
// } search: false,
// ], sortable: true,
filter: true,
rules: [ span: 12,
{ width: 100,
required: true, },
message: '请输入物料编号', {
trigger: 'blur', label: '提请数量',
}, prop: 'quantity',
], search: false,
}, sortable: true,
{ filter: true,
label: '物料名称', span: 12,
prop: 'goodsName', width: 100,
search: false, },
sortable: true, {
filter: true, label: '提请人',
span: 12, prop: 'crManName',
rules: [ search: true,
{ sortable: true,
required: true, filter: true,
message: '请输入物料名称', span: 12,
trigger: 'blur', },
}, {
], label: '提请日期',
}, prop: 'crDate',
{ search: true,
label: '规格', sortable: true,
prop: 'specifications', filter: true,
search: false, span: 12,
sortable: true, searchOrder: 16,
filter: true, width: 150,
searchLabelWidth: 60, searchRange: true,
span: 12, type: 'date',
rules: [ format: 'YYYY-MM-DD',
{ valueFormat: 'YYYY-MM-DD',
required: true, startPlaceholder: '开始时间',
message: '请输入规格', endPlaceholder: '结束时间',
trigger: 'blur', },
}, {
], label: '关联订单号',
}, prop: 'woCode',
{ search: false,
label: '提请数量', sortable: true,
prop: 'quantity', filter: true,
search: false, span: 12,
sortable: true, searchOrder: 17,
filter: true, width: 140,
span: 12, },
rules: [ {
{ label: '备注',
required: true, prop: 'memo',
message: '请输入提请数量', search: false,
trigger: 'blur', sortable: true,
}, filter: true,
], span: 12,
}, },
{ {
label: '提请人', label: '出库状态',
prop: 'crManName', prop: 'curStatus',
// bind: 'crMan.userName', search: true,
search: true, sortable: true,
sortable: true, filter: true,
filter: true, span: 12,
span: 12, searchOrder: 17,
rules: [ type: 'select',
{ width: 100,
required: true, dicData: [
message: '请输入提请人', { label: '新建', value: 1 },
trigger: 'blur', { label: '待出库', value: 15 },
}, { label: '已完成', value: 20 },
], { label: '已删除', value: 21 },
}, ],
{ },
label: '提请日期', ],
prop: 'crDate', },
search: true, form: {},
sortable: true, page: {
filter: true, pageSize: 10,
span: 12, currentPage: 1,
searchOrder: 16, total: 0,
width:180, },
searchRange: true, isOpen: false,
type: 'date', moldAddMore: false,
format:"YYYY-MM-DD", buyCycle: 0,
valueFormat:"YYYY-MM-DD", query: {},
startPlaceholder: '开始时间', approveDialog: false,
endPlaceholder: "结束时间", auditForm: {},
auditRules: {
approvalResult: [{ required: true, message: '请选择是否通过审核', trigger: 'blur' }],
}, },
{ };
label: '关联订单号', },
prop: 'woCode', methods: {
search: false, //
sortable: true, handleAdd() {
filter: true, this.isOpen = true;
span: 12, this.moldAddMore = true;
searchOrder: 17,
},
{
label: '备注',
prop: 'memo',
search: false,
sortable: true,
filter: true,
span: 12,
},
{
label: '出库状态',
prop: 'curStatus',
search: true,
sortable: true,
filter: true,
span: 12,
searchOrder: 17,
type: 'select',
dicData: [
{label: '新建',value:1},
{label: '待出库',value:15},
{label: '已完成',value:20},
{label: '已删除',value:21},
]
},
]
},
form: {
},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
isOpen: false,
moldAddMore: false,
buyCycle: 0,
query:{},
approveDialog:false,
auditForm:{},
auditRules:{
approvalResult:[{ required: true, message: '请选择是否通过审核', trigger: 'blur' }]
},
}
}, },
methods: { closeDialog(val) {
// this.isOpen = false;
handleAdd() { if (val) {
this.isOpen = true this.onLoad();
this.moldAddMore = true }
}, },
closeDialog(val) { handeExamine(row) {
this.isOpen = false this.auditForm = {};
if(val){ this.auditForm.id = row.id;
this.onLoad() this.approveDialog = true;
} },
}, submit() {
handeExamine(row){ this.$refs.auditForm.validate(valid => {
this.auditForm = {} if (valid) {
this.auditForm.id = row.id approve({ ...this.auditForm }).then(res => {
this.approveDialog = true if (res.data.code == 200) {
}, this.$message.success('审批成功');
submit(){ this.approveDialog = false;
this.$refs.auditForm.validate(valid => { this.onLoad();
if(valid){
approve({...this.auditForm}).then(res =>{
if(res.data.code == 200){
this.$message.success('审批成功')
this.approveDialog = false
this.onLoad()
}
})
}
})
},
searchChange(params, done){
this.query = params
this.page.currentPage = 1;
this.onLoad()
done()
},
searchReset(){
this.query = {}
this.onLoad()
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
delRequests({
ids:this.selectionList.map(item => item.id).join(',')
}).then(res =>{
if(res.data.code == 200){
this.$message.success('删除成功')
this.onLoad()
}
})
})
},
//
selectionChange(list) {
this.selectionList = list;
},
onLoad() {
this.loading = true
let params = {
...this.query,
startCrDate:this.query.crDate && this.query.crDate.length != 0 && this.query.crDate[0],
endCrDate:this.query.crDate && this.query.crDate.length != 0 && this.query.crDate[1],
} }
// const {crDate,...validParams} = params });
if(params.crDate) delete params.crDate
getList({
current:this.page.currentPage,
size:this.page.pageSize,
...params
}).then(res =>{
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
} }
} });
} },
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad();
done();
},
searchReset() {
this.query = {};
this.onLoad();
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
delRequests({
ids: this.selectionList.map(item => item.id).join(','),
}).then(res => {
if (res.data.code == 200) {
this.$message.success('删除成功');
this.onLoad();
}
});
});
},
//
selectionChange(list) {
this.selectionList = list;
},
onLoad() {
this.loading = true;
let params = {
...this.query,
startCrDate: this.query.crDate && this.query.crDate.length != 0 && this.query.crDate[0],
endCrDate: this.query.crDate && this.query.crDate.length != 0 && this.query.crDate[1],
};
// const {crDate,...validParams} = params
if (params.crDate) delete params.crDate;
getList({
current: this.page.currentPage,
size: this.page.pageSize,
...params,
}).then(res => {
this.data = res.data.data.records;
this.page.total = res.data.data.total;
this.loading = false;
});
},
},
};
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
Loading…
Cancel
Save