|
|
@@ -137,30 +137,20 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
name: "addMaterials",
|
|
|
- props:['itemtype','sa_serviceorderid'],
|
|
|
+ props:['itemtype','sa_serviceorderid','sa_workorderid'],
|
|
|
data(){
|
|
|
return {
|
|
|
drawerVisible:false,
|
|
|
loading:false,
|
|
|
param:{
|
|
|
- "id": "20220923140602",
|
|
|
+ "id": "2026022710102502",
|
|
|
"content": {
|
|
|
+ "sa_workorderid":0,
|
|
|
"pageSize": 20,
|
|
|
"pageNumber": 1,
|
|
|
+ "type":1,// 1 查询档案商品 2 查询申请单商品
|
|
|
"where": {
|
|
|
- "condition": "",
|
|
|
- "isservice": 1
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- param2:{
|
|
|
- "id": 20230206161903,
|
|
|
- "content": {
|
|
|
- "sa_serviceorderid":'',
|
|
|
- "pageNumber":1,
|
|
|
- "pageSize":20,
|
|
|
- "where":{
|
|
|
- "condition":''
|
|
|
+ "condition": ""
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -181,12 +171,15 @@ export default {
|
|
|
async listData(){
|
|
|
console.log(this.itemtype,'itemtype')
|
|
|
if (this.itemtype == '服务商品'){
|
|
|
- this.param2.content.sa_serviceorderid = this.sa_serviceorderid
|
|
|
- const res = await this.$api.requested(this.param2)
|
|
|
+ this.param.content.sa_workorderid = this.sa_workorderid
|
|
|
+ this.param.content.type = 2
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
this.list = res.data
|
|
|
this.total = res.total
|
|
|
this.currentPage = res.pageNumber
|
|
|
}else {
|
|
|
+ this.param.content.sa_workorderid = this.sa_workorderid
|
|
|
+ this.param.content.type = 1
|
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.list = res.data
|
|
|
this.total = res.total
|