|
@@ -152,7 +152,11 @@
|
|
|
<el-input v-model="todayPlanForm.productOrderNum" maxlength="50"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="项目名称" style="width: 100%" prop="projectName">
|
|
|
- <el-input :disabled="todayPlanForm.id==null?false:true" v-model="todayPlanForm.projectName" maxlength="50" @blur="filterProductList(todayPlanForm.projectName)"></el-input>
|
|
|
+ <!-- <el-input :disabled="todayPlanForm.id==null?false:true" v-model="todayPlanForm.projectName" maxlength="50" @blur="filterProductList(todayPlanForm.projectName)"></el-input> -->
|
|
|
+ <el-select :disabled="todayPlanForm.id==null?false:true" filterable remote reserve-keyword :remote-method="getProjectNames" @change="filterProductList(todayPlanForm.projectName)" v-model="todayPlanForm.projectName" placeholder="请输入项目名称" class="w100">
|
|
|
+ <el-option v-for="item in projectNameList" :key="item.label" :label="item.value" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="产品名称" style="width: 100%" prop="productId">
|
|
|
<el-select :disabled="todayPlanForm.id==null?false:true" v-model="todayPlanForm.productId" placeholder="请选择" class="w100" @change="setProductCode" filterable>
|
|
@@ -440,6 +444,7 @@ export default {
|
|
|
exportParam: { productId: null, rangeDatas: this.getCurrentRangeTime() },
|
|
|
searchType:'1',
|
|
|
searchValue:'',
|
|
|
+ projectNameList:[]
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -531,7 +536,7 @@ export default {
|
|
|
// this.todayPlanForm.projectName = arrList[0].projectName
|
|
|
// this.todayPlanForm.productName = arrList[0].name
|
|
|
this.$set(this.todayPlanForm, "projectCode", arrList[0].code)
|
|
|
- this.$set(this.todayPlanForm, "projectName", arrList[0].projectName)
|
|
|
+ // this.$set(this.todayPlanForm, "projectName", arrList[0].projectName)
|
|
|
this.$set(this.todayPlanForm, "productName", arrList[0].name)
|
|
|
},
|
|
|
today() {
|
|
@@ -735,6 +740,34 @@ export default {
|
|
|
this.hasChooseDept = item.departmentId;
|
|
|
this.getTableData(item.departmentId);
|
|
|
},
|
|
|
+ getProjectNames(value){
|
|
|
+ if(value != '') {
|
|
|
+ this.http.post(
|
|
|
+ "/product/getProductProjectNames",
|
|
|
+ {
|
|
|
+ value:value,
|
|
|
+ },
|
|
|
+ (res) => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.projectNameList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ (error) => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.projectNameList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取车间数据
|
|
|
getTableData(departmentId) {
|
|
|
console.log(this.planDate, departmentId);
|