This commit is contained in:
bb_pan 2025-06-18 15:23:12 +08:00
parent 839bc30db9
commit 3f60b6bcdc
8 changed files with 28 additions and 38 deletions

View File

@ -63,10 +63,11 @@ export function getAgreement(data) {
} }
// 领料申请-删除 // 领料申请-删除
export function applyRemove(ids) { export function applyRemove(data) {
return request({ return request({
url: '/material/lease_apply_info/' + ids, url: '/material/scrap_apply_details/delete',
method: 'delete', method: 'post',
data,
}) })
} }

View File

@ -214,12 +214,12 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5" v-if="!isDetail">
<el-button type="primary" plain icon="el-icon-document" size="mini" @click="handleSave" v-if="!isDetail"> <el-button type="primary" plain icon="el-icon-document" size="mini" @click="handleSave">
{{ isEdit ? '提交' : '发起申请' }} {{ isEdit ? '提交' : '发起申请' }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5" v-if="!isDetail">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addColumns">新增条目</el-button> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addColumns">新增条目</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -604,6 +604,7 @@ export default {
console.log('isEdit', this.isEdit) console.log('isEdit', this.isEdit)
this.getTaskInfo() this.getTaskInfo()
} }
console.log('🚀 ~ created ~ this.isDetail:', this.isDetail)
console.log(this.$store, 'this.$store.getters') console.log(this.$store, 'this.$store.getters')
console.log(this.$route.query, 'this.$route.query') console.log(this.$route.query, 'this.$route.query')
}, },
@ -680,7 +681,6 @@ export default {
// }, // },
async getTypeList(row, typeIds, index) { async getTypeList(row, typeIds, index) {
console.log('🚀 ~ getTypeList ~ row:', row) console.log('🚀 ~ getTypeList ~ row:', row)
console.log('🚀 ~ getTypeList ~ typeId:', typeIds[typeIds.length - 1])
// //
const filterData = data => { const filterData = data => {
data.forEach(item => { data.forEach(item => {
@ -765,7 +765,7 @@ export default {
}, },
/** 转换菜单数据结构 */ /** 转换菜单数据结构 */
normalizer(node) { normalizer(node) {
if (node.children && !node.children.length) { if (!Array.isArray(node.children) || node.children.length === 0) {
delete node.children delete node.children
} }
return { return {
@ -847,6 +847,7 @@ export default {
/** 机具类型 */ /** 机具类型 */
equipmentType() { equipmentType() {
equipmentTypeTree().then(response => { equipmentTypeTree().then(response => {
console.log('🚀 ~ equipmentTypeTree ~ response:', response)
this.equipmentTypeList = response.data this.equipmentTypeList = response.data
// //
this.flattenTypeOptions = this.processTypeData(response.data) this.flattenTypeOptions = this.processTypeData(response.data)
@ -854,7 +855,7 @@ export default {
this.filteredOptions = [...this.flattenTypeOptions] this.filteredOptions = [...this.flattenTypeOptions]
// //
if (this.equipmentList.length > 0) { if (this.equipmentList && this.equipmentList.length > 0) {
this.deviceType = this.equipmentList.map(item => item.typeId) this.deviceType = this.equipmentList.map(item => item.typeId)
} }
}) })

View File

@ -63,7 +63,7 @@
:data="leaseList" :data="leaseList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" :selectable="(row) => row.pendingNum != 0" />
<el-table-column align="center" label="序号" type="index" width="55" /> <el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column <el-table-column
align="center" align="center"

View File

@ -4,8 +4,8 @@
<el-form-item prop="dateRange"> <el-form-item prop="dateRange">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
@ -309,13 +309,8 @@
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
if(this.dateRange.length>0){ this.queryParams.startTime= this.dateRange ? this.dateRange[0] : ''
this.queryParams.startTime=this.dateRange[0] this.queryParams.endTime= this.dateRange ? this.dateRange[1] : ''
this.queryParams.endTime=this.dateRange[1]
}else{
this.queryParams.startTime=undefined
this.queryParams.endTime=undefined
}
this.queryParams.taskStage= 2 this.queryParams.taskStage= 2
getPurchaseList(this.queryParams).then(response => { getPurchaseList(this.queryParams).then(response => {
this.tableList = response.data.rows; this.tableList = response.data.rows;

View File

@ -54,7 +54,7 @@
</el-radio-group> </el-radio-group>
<!-- <div style="height: 40px; flex: 1;"> --> <!-- <div style="height: 40px; flex: 1;"> -->
<el-date-picker <el-date-picker
v-if="dateType === 'day'" v-show="dateType === 'day'"
v-model="maForm.productionTime" v-model="maForm.productionTime"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -65,7 +65,7 @@
></el-date-picker> ></el-date-picker>
<el-date-picker <el-date-picker
v-if="dateType === 'month'" v-show="dateType === 'month'"
v-model="maForm.productionTime" v-model="maForm.productionTime"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM" value-format="yyyy-MM"

View File

@ -18,7 +18,6 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
end-placeholder="结束日期" end-placeholder="结束日期"
start-placeholder="开始日期" start-placeholder="开始日期"
@change="onTimeChange"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
@ -245,6 +244,8 @@ export default {
}, },
// //
async getList() { async getList() {
this.queryParams.startTime = this.queryTime ? this.queryTime[0] : ''
this.queryParams.endTime = this.queryTime ? this.queryTime[1] : ''
this.loading = true this.loading = true
this.queryParams.taskStage = 3 this.queryParams.taskStage = 3
const res = await getNewBuyBindListApi(this.queryParams) const res = await getNewBuyBindListApi(this.queryParams)

View File

@ -4,8 +4,8 @@
<el-form-item prop="dateRange"> <el-form-item prop="dateRange">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@ -275,13 +275,8 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true this.loading = true
if (this.dateRange.length > 0) { this.queryParams.startTime= this.dateRange ? this.dateRange[0] : ''
this.queryParams.startTime = this.dateRange[0] this.queryParams.endTime= this.dateRange ? this.dateRange[1] : ''
this.queryParams.endTime = this.dateRange[1]
} else {
this.queryParams.startTime = undefined
this.queryParams.endTime = undefined
}
// this.queryParams.statusList=[3,13,4,14,19] // this.queryParams.statusList=[3,13,4,14,19]
this.queryParams.taskStage = 4 this.queryParams.taskStage = 4
// this.queryParams.modelName="" // this.queryParams.modelName=""

View File

@ -116,10 +116,10 @@
@click="handleView(scope.row)" @click="handleView(scope.row)"
>查看</el-button> >查看</el-button>
<el-button size="mini" style="margin-bottom: 10px" type="primary" <el-button size="mini" style="margin-bottom: 10px" type="primary"
@click="handleUpdate(scope.row)" v-if="scope.row.taskStatus != 4" v-hasPermi="['purchase:info:edit']" @click="handleUpdate(scope.row)" v-if="scope.row.taskStatus != 1" v-hasPermi="['purchase:info:edit']"
>编辑</el-button> >编辑</el-button>
<el-button size="mini" type="danger" <el-button size="mini" type="danger"
@click="handleDeletePurchase(scope.row)" v-if="scope.row.taskStatus == 1" v-hasPermi="['purchase:info:remove']" @click="handleDeletePurchase(scope.row)" v-if="scope.row.taskStatus != 1" v-hasPermi="['purchase:info:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -307,14 +307,11 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDeletePurchase(row) { handleDeletePurchase(row) {
// console.log(row) console.log('🚀 ~ handleDeletePurchase ~ row:', row)
let ids = [];
ids.push(row.id);
console.log("ids", ids);
this.$modal this.$modal
.confirm("是否确认删除所选择的数据项?") .confirm("是否确认删除所选择的数据项?")
.then(function () { .then(function () {
return applyRemove(ids); return applyRemove({ taskId: row.taskId })
}) })
.then(() => { .then(() => {
this.getList(); this.getList();