|
|
|
@ -32,7 +32,14 @@ |
|
|
|
<el-row :gutter="16"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="工厂编码"> |
|
|
|
<el-input v-model="searchData.site" placeholder="请输入工厂编码" clearable @click.native="getBaseList(18)"></el-input> |
|
|
|
<el-select v-model="searchData.site" placeholder="请选择工厂编码" clearable style="width: 100%"> |
|
|
|
<el-option |
|
|
|
v-for="item in siteList" |
|
|
|
:key="item" |
|
|
|
:label="item" |
|
|
|
:value="item"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
@ -297,6 +304,7 @@ |
|
|
|
<script> |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist'; |
|
|
|
import { searchShopOrderForAlloc, selectByAllocType, executeWorkOrderAlloc, executeWorkOrderSync } from "@/api/shopOrder/workOrderAlloc.js"; |
|
|
|
import { getSiteList } from "@/api/report/partTemplateStatus.js"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "searchWorkOrderAlloc", |
|
|
|
@ -305,6 +313,7 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
siteList: [], |
|
|
|
tagNo: '', |
|
|
|
// 搜索区域展开/收起 |
|
|
|
searchExpanded: true, |
|
|
|
@ -408,9 +417,18 @@ export default { |
|
|
|
// 设置默认查询时间为本月 |
|
|
|
this.setDefaultDateRange(); |
|
|
|
// 初始化加载数据 |
|
|
|
this.getSiteList(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取工厂编码列表 |
|
|
|
getSiteList() { |
|
|
|
getSiteList().then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.siteList = data.siteList || []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 设置默认日期范围为本月 |
|
|
|
setDefaultDateRange() { |
|
|
|
const now = new Date(); |
|
|
|
@ -472,9 +490,6 @@ export default { |
|
|
|
if (this.tagNo === 16) { |
|
|
|
this.searchData.orderType = val.OrderType |
|
|
|
} |
|
|
|
if (this.tagNo === 18) { |
|
|
|
this.searchData.site = val.Site |
|
|
|
} |
|
|
|
if (this.tagNo === 5) { |
|
|
|
this.searchData.partNo = val.PartNo |
|
|
|
} |
|
|
|
@ -487,9 +502,6 @@ export default { |
|
|
|
if (val === 16) { |
|
|
|
strVal = this.searchData.orderType |
|
|
|
} |
|
|
|
if (val === 18) { |
|
|
|
strVal = this.searchData.site |
|
|
|
} |
|
|
|
if (val === 5) { |
|
|
|
strVal = this.searchData.partNo |
|
|
|
} |
|
|
|
|