Browse Source

2025-05-28

刀具申请页面基本信息查不出
master
fengyuan_yang 8 months ago
parent
commit
ab27ffc7a3
  1. 4
      src/views/modules/demoComponents/orderProperties.vue
  2. 36
      src/views/modules/tooling/searchToolApply.vue
  3. 82
      src/views/modules/tooling/toolingInfo.vue

4
src/views/modules/demoComponents/orderProperties.vue

@ -8,9 +8,7 @@
<el-button type="primary" :loading="loading" v-if="orderNo" :disabled="disabled" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
</template>
<template v-if="isAuth('103001:tab1:save')">
<el-button type="primary" @click="refreshPropertiesModal" :disabled="disabled"
v-if="attributeDialog && orderNo">刷新属性模板
</el-button>
<el-button type="primary" @click="refreshPropertiesModal" :disabled="disabled" v-if="attributeDialog && orderNo">刷新属性模板</el-button>
</template>
</div>
<div class="rq " v-if="attributeDialog">

36
src/views/modules/tooling/searchToolApply.vue

@ -49,6 +49,7 @@
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList1"
@ -91,12 +92,11 @@
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@ -106,11 +106,10 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card"
@tab-click="tabClick">
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="基本信息" name="attribute">
<order-attribute ref="dialogAttribute" :order-no="currentRow.applyNo" :code-no="'toolApply'"
:function-type="'TL_Receipt'"></order-attribute>
<order-attribute ref="dialogAttribute" :order-no="currentRow.applyNo" :code-no="'toolApply'" :function-type="'TL_Receipt'"></order-attribute>
</el-tab-pane>
<el-tab-pane label="工具明细" name="detail">
<el-table
@ -131,8 +130,7 @@
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
@ -158,7 +156,6 @@
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-tab-pane>
<el-tab-pane label="处理信息" name="tab4">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
@ -206,15 +203,14 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="附件信息" name="down">
<oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site"
:order-ref2="currentRow.applyNo"></oss-components>
<oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
</el-tab-pane>
<!-- 审批信息 -->
<el-tab-pane label="审批信息" name="approvalInformation">
<approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
</el-tab-pane>
</el-tabs>
<el-dialog
width="800px" v-drag
:title="'刀模申请修改'"
@ -228,8 +224,7 @@
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'总成本'">
<el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px"
disabled></el-input>
<el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'申请人'" required="required">
@ -246,8 +241,12 @@
</el-date-picker>
</el-form-item>
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department"
dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
<dict-data-select
:site="$store.state.user.site"
v-model="dataForm.department"
dict-type="tool_application_department"
disabled style="width: 130px">
</dict-data-select>
</el-form-item>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价员</a></span>
@ -1678,6 +1677,9 @@ export default {
if (this.activeName === 'approvalInformation') {
this.getApprovalList()
}
if (this.activeName == 'attribute') { //
}
},
searchToolApplyDetail() {

82
src/views/modules/tooling/toolingInfo.vue

@ -420,59 +420,58 @@ export default {
}
},
changeSum(row){
if(row.standardCost<0||row.standardCost==null||row.standardCost==''){
row.standardCost=0
if (row.standardCost < 0 || row.standardCost == null || row.standardCost == '') {
row.standardCost = 0
// this.$alert('', '', {
// confirmButtonText: ''
// })
}
this.dataForm.applySumQty = 0
this.dataForm.totalCost = 0
for (const item of this.selectionDataList) {
// null undefined 0
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0)
this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty * item.standardCost : 0)
}
},
saveData(){
if(this.dataForm.applySumQty===0){
this.$alert('未填写申请数!', '错误', {
saveData () {
if (this.dataForm.applySumQty === 0) {
this.$alert('未填写申请数!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.applyBy===''||this.dataForm.applyBy==null){
if (this.dataForm.applyBy === '' || this.dataForm.applyBy == null) {
this.$alert('未选择申请人!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.applyDate===''||this.dataForm.applyDate==null){
if (this.dataForm.applyDate === '' || this.dataForm.applyDate == null) {
this.$alert('未选择申请日期!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.department===''||this.dataForm.department==null){
if (this.dataForm.department === '' || this.dataForm.department == null) {
this.$alert('未选择部门!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.quoter===''||this.dataForm.quoter==null){
if (this.dataForm.quoter === '' || this.dataForm.quoter == null) {
this.$alert('未选择报价员!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.tp===''||this.dataForm.tp==null){
if (this.dataForm.tp === '' || this.dataForm.tp == null) {
this.$alert('未选择TP!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.purchaser===''||this.dataForm.purchaser==null){
if (this.dataForm.purchaser === '' || this.dataForm.purchaser == null) {
this.$alert('未选择采购专员!', '错误', {
confirmButtonText: '确定'
})
@ -484,46 +483,51 @@ export default {
type: 'warning'
}).then(() => {
for (let i = 0; i < this.selectionDataList.length; i++) {
if (this.selectionDataList[i].applyQty===''||this.selectionDataList[i].applyQty==null){
this.selectionDataList[i].applyQty=0
if (this.selectionDataList[i].applyQty === '' || this.selectionDataList[i].applyQty == null) {
this.selectionDataList[i].applyQty = 0
}
}
this.dataForm.detailList=this.selectionDataList.filter(item => item.applyQty > 0).filter(item => item.standardCost >= 0)
this.dataForm.detailList = this.selectionDataList.filter(item => item.applyQty > 0).filter(item => item.standardCost >= 0)
saveProjectToolApply(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.visible=false;
this.queryDataList();
this.visible = false
this.queryDataList()
this.$message.success('操作成功')
//
if(this.jumpFlag){
if (this.jumpFlag) {
let inData = {
site: this.$store.state.user.site,
applyNo: data.applyNo,
username: this.$store.state.user.name
};
}
localStorage.setItem('ToolApplyData', JSON.stringify(inData))
this.$router.push('tooling-searchToolApply')
}
} else {
this.$message.warning(data.msg);
this.$message.warning(data.msg)
}
})
})
},
applyModel() {
if(this.selectionDataList.length===0){
//
applyModel () {
if (this.selectionDataList.length === 0) {
this.$alert('请选择项目!', '错误', {confirmButtonText: '确定'})
return false;
}
this.selectionDataList.forEach(item => {
item.applyQty = ''
})
this.dataForm = {
site: this.$store.state.user.site,
applyNo: '',
applyBy:this.$store.state.user.name,
applyDate:new Date(),
applySumQty:0,
applyReason:'',
remark:'',
createBy:this.$store.state.user.name,
applyBy: this.$store.state.user.name,
applyDate: new Date(),
applySumQty: 0,
applyReason: '',
remark: '',
createBy: this.$store.state.user.name,
department: '',
quoter: '',
quoterName: '',
@ -532,16 +536,18 @@ export default {
purchaser: '',
totalCost: '',
purchaserName: '',
detailList:[],
};
this.visible=true;
this.jumpFlag=true;
detailList: [],
}
this.visible = true
this.jumpFlag = true
},
},
created() {
// Site
this.queryParams.site = this.$store.state.user.site;
},
watch:{
queryLoading(newVal,oldVal){
if (newVal){
@ -652,7 +658,7 @@ export default {
<el-dialog width="1000px" v-drag title="刀模申请" :close-on-click-modal="false" :visible.sync="visible">
<el-form :model="dataForm" label-position="top" label-width="100px" >
<el-form :model="dataForm" label-position="top" label-width="100px">
<el-row :gutter="10">
<el-col :span="4.8">
<el-form-item label="申请编号">
@ -700,7 +706,7 @@ export default {
<el-col :span="4.8">
<el-form-item required>
<span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
<el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly ></el-input>
<el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly ></el-input>
</el-form-item>
</el-col>
<el-col :span="4.8">
@ -710,7 +716,7 @@ export default {
</el-form-item>
</el-col>
<el-col :span="4.8">
<el-form-item label=" " >
<el-form-item label=" ">
<el-checkbox v-model="jumpFlag">跳转至申请记录</el-checkbox>
</el-form-item>
</el-col>
@ -740,7 +746,7 @@ export default {
<el-table-column label="工具数量" align="right" header-align="center" width="80" prop="toolQty" show-overflow-tooltip/>
<el-table-column label="申请数量" align="right" header-align="center" width="80" prop="applyQty" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column label="工具成本" align="right" header-align="center" width="80" prop="standardCost" show-overflow-tooltip>

Loading…
Cancel
Save