|
@@ -39,57 +39,60 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="工单编号" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.name }}</span>
|
|
|
+ <span>{{ scope.row.number }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="类型" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.work_order_category_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span v-if = "scope.row.status == 0">未知</span>
|
|
|
+ <span v-if = "scope.row.status == 1">未完成</span>
|
|
|
+ <span v-if = "scope.row.status == 2">已关闭</span>
|
|
|
+ <span v-if = "scope.row.status == 3">已完成</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="对象" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <el-button type="primary" size="mini" @click="form_record_see(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.remark }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="负责人" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.user_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="负责人手机号" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.user_phone }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="派单人" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.operation_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="派单人手机号" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.operation_phone }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="派单时间" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.created_at_format }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="完成时间" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</span>
|
|
|
+ <span>{{ scope.row.finished_at_format }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -120,15 +123,15 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="工单类型:" prop="name">
|
|
|
- <el-select v-model="addForm.formula_id" filterable placeholder="请选择" class="filter-item" style="width: 100%;" >
|
|
|
+ <el-select v-model="addForm.formula_id" placeholder="请选择" class="filter-item" style="width: 100%;" >
|
|
|
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="负责人员:" prop="formula_id">
|
|
|
- <el-select v-model="addForm.formula_id" filterable placeholder="请选择" class="filter-item" style="width: 100%;" >
|
|
|
- <el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ <el-select v-model="addForm.formula_id" placeholder="请选择" class="filter-item" style="width: 100%;" @change = "change_person" >
|
|
|
+ <el-option v-for="item in personList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -148,7 +151,11 @@
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
- <el-transfer :titles="['栏舍名称(犊牛数量)', '栏舍名称(犊牛数量)']" v-model="transDataChooseRight" :data="transDataList" :props="{ key: 'id', label: 'name' }" @change="change_transData"></el-transfer>
|
|
|
+ <el-transfer :titles="['栏舍组名称', '栏舍名称组']" v-model="transDataChooseRight1" :data="transDataList1" :props="{ key: 'id', label: 'name' }" @change="change_transData1"></el-transfer>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-transfer :titles="['栏舍名称', '栏舍名称']" v-model="transDataChooseRight2" :data="transDataList2" :props="{ key: 'id', label: 'name' }" @change="change_transData2"></el-transfer>
|
|
|
</el-row>
|
|
|
|
|
|
|
|
@@ -233,6 +240,10 @@ export default {
|
|
|
|
|
|
],
|
|
|
|
|
|
+ personList:[
|
|
|
+
|
|
|
+ ],
|
|
|
+
|
|
|
statusList:[
|
|
|
{id: 0, name: '未知'},
|
|
|
{id: 1, name: '未完成'},
|
|
@@ -257,10 +268,24 @@ export default {
|
|
|
|
|
|
},
|
|
|
|
|
|
- //穿梭框右边的值
|
|
|
- transDataChooseRight:[],
|
|
|
+
|
|
|
+ //穿梭框右边的值
|
|
|
+ transDataChooseRight1:[],
|
|
|
//穿梭框所有列表
|
|
|
- transDataList:[
|
|
|
+ transDataList1:[
|
|
|
+ // {key:1,label:'组1',disabled:false},
|
|
|
+ // {key:2,label:'组2',disabled:false},
|
|
|
+ // {key:3,label:'组3',disabled:false},
|
|
|
+ // {key:4,label:'组4',disabled:false},
|
|
|
+ // {key:5,label:'组5',disabled:false},
|
|
|
+ // {key:6,label:'组6',disabled:false},
|
|
|
+ // {key:7,label:'组7',disabled:false},
|
|
|
+ ],
|
|
|
+
|
|
|
+ //穿梭框右边的值
|
|
|
+ transDataChooseRight2:[],
|
|
|
+ //穿梭框所有列表
|
|
|
+ transDataList2:[
|
|
|
// {key:1,label:'组1',disabled:false},
|
|
|
// {key:2,label:'组2',disabled:false},
|
|
|
// {key:3,label:'组3',disabled:false},
|
|
@@ -305,29 +330,65 @@ export default {
|
|
|
var me = this
|
|
|
ajaxDataPost('/api/v1/ops/base_setting/category_table/list?page=1&page_size=1000', {}).then(e => {
|
|
|
console.log("工单下拉框1:",e)
|
|
|
-
|
|
|
- //打印请求成功结果
|
|
|
-
|
|
|
if(e.code == 200 ){
|
|
|
-
|
|
|
me.typeList = e.data.list
|
|
|
} else {
|
|
|
me.typeList = []
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- ajaxDataPost('/api/v1/ops/barn/list?page=1&page_size=1000', {name:"",barn_group_name:"",status:undefined}).then(e => {
|
|
|
+
|
|
|
+ ajaxDataPost('/api/v1/system/user/list?page=1&page_size=1000', {name:""}).then(e => {
|
|
|
+ console.log("人员下拉:",e)
|
|
|
+ if(e.code == 200 ){
|
|
|
+ me.personList = e.data.list
|
|
|
+ } else {
|
|
|
+ me.personList = []
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ ajaxDataPost('/api/v1/ops/barn_group/list?page=1&page_size=1000', {name:""}).then(e => {
|
|
|
console.log("穿梭框1:",e)
|
|
|
|
|
|
//打印请求成功结果
|
|
|
if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0 ){
|
|
|
- me.transDataList = []
|
|
|
+ me.transDataList1 = []
|
|
|
+ } else {
|
|
|
+ var transDataList1 = e.data.list
|
|
|
+ transDataList1.forEach(function(item){
|
|
|
+ item.name = item.name + "(犊牛数量:"+ item.calf_number + ")"
|
|
|
+ })
|
|
|
+ me.transDataList1 = transDataList1
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ ajaxDataPost('/api/v1/ops/barn/list?page=1&page_size=1000', {name:"",barn_group_name:"",status:undefined}).then(e => {
|
|
|
+ console.log("穿梭框2:",e)
|
|
|
+
|
|
|
+ //打印请求成功结果
|
|
|
+ if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0 ){
|
|
|
+ me.transDataList2 = []
|
|
|
} else {
|
|
|
- me.transDataList = e.data.list
|
|
|
+
|
|
|
+ var transDataList2 = e.data.list
|
|
|
+ transDataList2.forEach(function(item){
|
|
|
+ if(item.stauts == 4){
|
|
|
+ item.name = item.name + "(犊牛数量:0)"
|
|
|
+ } else {
|
|
|
+ item.name = item.name + "(犊牛数量:1)"
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ me.transDataList2 = transDataList2
|
|
|
+
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -385,7 +446,26 @@ export default {
|
|
|
//重置 表格
|
|
|
form_clear(){
|
|
|
var me = this
|
|
|
- me.searchData.name = ""
|
|
|
+ me.searchData.number = ""
|
|
|
+ me.searchData.user_name = ""
|
|
|
+ me.searchData.user_phone = ""
|
|
|
+ me.searchData.operation_user = ""
|
|
|
+ me.searchData.operation_phone = ""
|
|
|
+ me.searchData.work_order_category_id = undefined
|
|
|
+ me.searchData.status = 0
|
|
|
+ me.searchData.start_finished_time = ""
|
|
|
+ me.searchData.end_finished_time = ""
|
|
|
+ me.searchData.start_created_time = ""
|
|
|
+ me.searchData.end_created_time = ""
|
|
|
+ me.searchData.inputDatetime1 = ""
|
|
|
+ me.searchData.inputDatetime2 = ""
|
|
|
+
|
|
|
+ me.searchData.page = 1
|
|
|
+ me.searchData.page_size = 10
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
me.get_table_data()
|
|
|
},
|
|
|
|
|
@@ -542,9 +622,26 @@ export default {
|
|
|
|
|
|
},
|
|
|
|
|
|
+ change_person(value){
|
|
|
+ var me = this
|
|
|
+ console.log("更改牛号Id",value)
|
|
|
+ var item = me.cowNameList.find(obj => obj.calf_code == value)
|
|
|
+ console.log("更改牛号当前的内容",item)
|
|
|
+ me.addForm.calf_code = item.calf_code
|
|
|
+ me.addForm.calf_category_id = item.calf_category_id
|
|
|
+ me.addForm.calf_category_name = item.calf_category_name
|
|
|
+ me.addForm.original_barn_id = item.barn_id
|
|
|
+ me.addForm.original_barn_name = item.barn_name
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ //监听 - 穿梭框选到右边的值
|
|
|
+ change_transData1(value){
|
|
|
+ console.log("穿梭框选到右边的值",value)
|
|
|
+ },
|
|
|
|
|
|
//监听 - 穿梭框选到右边的值
|
|
|
- change_transData(value){
|
|
|
+ change_transData2(value){
|
|
|
console.log("穿梭框选到右边的值",value)
|
|
|
},
|
|
|
|