Browse Source

Merge remote-tracking branch 'origin/master'

master
qiezi 1 year ago
parent
commit
65488fd71f
  1. 140
      src/views/modules/tooling/toolingInfo.vue
  2. 54
      src/views/modules/tooling_old/searchToolApply.vue

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

@ -89,6 +89,15 @@
<el-form-item :label="'申请编号'">
<el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'申请总数'">
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
</el-form-item>
<!-- <el-form-item :label="'总金额'">-->
<!-- <el-input v-model="dataForm.allCost" style="width: 130px" disabled></el-input>-->
<!-- </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" style="width: 130px"></dict-data-select>
</el-form-item>
<el-form-item :label="'申请人'" required="required">
<el-input v-model="dataForm.applyBy" style="width: 130px" ></el-input>
</el-form-item>
@ -101,12 +110,19 @@
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'申请总数'">
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</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" style="width: 130px"></dict-data-select>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">TP</a></span>
<el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</el-form-item>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'申请原因'">
@ -159,6 +175,7 @@
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser>
</div>
</template>
@ -169,9 +186,10 @@
} from "@/api/tool/toolApply.js"
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from "../sys/dict-data-select.vue"
import ChooseUser from '@/views/modules/common/ChooseUser'
export default {
components: {
Chooselist, DictDataSelect,
Chooselist, DictDataSelect,ChooseUser,
},
data() {
return {
@ -478,6 +496,12 @@
remark:'',
createBy:'',
department:'',
quoter: '',
quoterName: '',
tp: '',
tpName: '',
purchaser: '',
purchaserName: '',
detailList:[],
},
toolData:[],
@ -512,15 +536,67 @@
})
},
methods: {
getUserList (type) {
if(this.ifDisableFlag){
return false
}
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if(type==1) {
strVal = this.dataForm.quoter
}
if(type==2) {
strVal = this.dataForm.tp
}
if(type==3) {
strVal = this.dataForm.purchaser
}
this.$refs.userList.init(this.searchData.site,'%%', strVal)
})
},
/* 列表方法的回调 */
getUserData (val) {
if(this.tagNo1==1) {
this.dataForm.quoter = val.username
this.dataForm.quoterName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.quoterName);
});
}
if(this.tagNo1==2) {
this.dataForm.tp = val.username
this.dataForm.tpName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.tpName);
});
}
if(this.tagNo1==3) {
this.dataForm.purchaser = val.username
this.dataForm.purchaserName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.purchaserName);
});
}
},
// S
getBaseList (val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 1013) {
if (val === 103) {
if(type==1) {
strVal = this.dataForm.partType
strVal = this.dataForm.quoter
}
if(type==2) {
strVal = this.dataForm.tp
}
if(type==3) {
strVal = this.dataForm.purchaser
}
}
this.$refs.baseList.init(val, strVal)
@ -528,10 +604,27 @@
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1013) {
if (this.tagNo === 103) {
if(this.tagNo1==1) {
this.dataForm.partType = val.Base_id
this.dataForm.partTypeDesc = val.Base_desc
this.dataForm.quoter = val.username
this.dataForm.quoterName = val.user_display
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.quoterName);
});
}
if(this.tagNo1==2) {
this.dataForm.tp = val.username
this.dataForm.tpName = val.user_display
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.tpName);
});
}
if(this.tagNo1==3) {
this.dataForm.purchaser = val.username
this.dataForm.purchaserName = val.user_display
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.purchaserName);
});
}
}
},
@ -589,6 +682,12 @@
remark:'',
createBy:this.$store.state.user.name,
department: '',
quoter: '',
quoterName: '',
tp: '',
tpName: '',
purchaser: '',
purchaserName: '',
detailList:[],
};
this.visible=true;
@ -602,9 +701,12 @@
//
// }
this.dataForm.applySumQty =0
// this.dataForm.allCost =0
for (const item of this.toolData) {
// null undefined 0
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
// this.dataForm.allCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
}
},
saveData(){
@ -640,6 +742,24 @@
})
return false;
}
if(this.dataForm.quoter===''||this.dataForm.quoter==null){
this.$alert('未选择报价员!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.tp===''||this.dataForm.tp==null){
this.$alert('未选择TP!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.purchaser===''||this.dataForm.purchaser==null){
this.$alert('未选择采购员!', '错误', {
confirmButtonText: '确定'
})
return false;
}
this.$confirm('确定要保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

54
src/views/modules/tooling_old/searchToolApply.vue

@ -437,6 +437,60 @@
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table1QuoterName',
tableId: "106002Table1",
tableName: "刀具申请主表",
columnProp: "quoterName",
headerAlign: "center",
align: "left",
columnLabel: "报价员",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table1TpName',
tableId: "106002Table1",
tableName: "刀具申请主表",
columnProp: "tpName",
headerAlign: "center",
align: "left",
columnLabel: "TP",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table1PurchaserName',
tableId: "106002Table1",
tableName: "刀具申请主表",
columnProp: "purchaserName",
headerAlign: "center",
align: "left",
columnLabel: "采购员",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,

Loading…
Cancel
Save