增加派单页面逻辑

dev-jingling
jingling 9 months ago
parent 89ebc3b1cb
commit 0035562d8f

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-01-30
* 2024-02-01
*/
public interface RecycleOrderMapper extends BaseMapper<RecycleOrderEntity> {

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-01-30
* 2024-02-01
*/
public interface RecycleOrderService extends IService<RecycleOrderEntity> {
List<RecycleOrderEntity> getList(RecycleOrderPagination recycleOrderPagination);

@ -36,7 +36,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-01-30
* 2024-02-01
*/
@Service
public class RecycleOrderServiceImpl extends ServiceImpl<RecycleOrderMapper, RecycleOrderEntity> implements RecycleOrderService{

@ -34,7 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-30
* @ 2024-02-01
*/
@Slf4j
@RestController

@ -10,7 +10,7 @@ import java.math.BigDecimal;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-30
* @ 2024-02-01
*/
@Data
@TableName("nx_recycle_order")
@ -49,7 +49,7 @@ public class RecycleOrderEntity {
private Date appointmentTimeEnd;
@TableField(value = "STAFFS_ID" , updateStrategy = FieldStrategy.IGNORED)
private String staffsId;
@TableField("STAFFS_NAME")
@TableField(value = "STAFFS_NAME" , updateStrategy = FieldStrategy.IGNORED)
private String staffsName;
@TableField(value = "CONSULT_TIME_START" , updateStrategy = FieldStrategy.IGNORED)
private Date consultTimeStart;

@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-30
* @ 2024-02-01
*/
@Data
public class RecycleOrderForm {
@ -59,6 +59,9 @@ public class RecycleOrderForm {
/** 回收员 **/
@JsonProperty("staffsId")
private Object staffsId;
/** 回收员姓名 **/
@JsonProperty("staffsName")
private String staffsName;
/** 创建用户 **/
@JsonProperty("creatorUserId")
private String creatorUserId;

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-30
* @ 2024-02-01
*/
@Data
public class RecycleOrderPagination extends Pagination {

@ -7,11 +7,12 @@
<el-page-header @back="goBack" :content="dataForm.isJiedan?'派单':'详情' " />
<div class="options">
<el-button type="primary" v-if="dataForm.isJiedan==true" @click="getStaffList()">
<span v-if="staff.length>1"> {{staff}}</span>
<span v-if="dataForm.staffsName"> {{dataForm.staffsName}}</span>
<span v-else></span>
</el-button>
<el-button @click="goBack"> </el-button>
<el-button @click="paidanConfirm"></el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
@ -98,7 +99,12 @@
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="回收员" prop="staffsId">
<p>{{ dataForm.staffsId }} </p>
<p>{{dataForm.staffsId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="回收员姓名" prop="staffsName">
<p>{{dataForm.staffsName}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -177,11 +183,8 @@
</el-col>
</template>
</el-form>
</el-row>
</div>
</transition>
<!-- 点击派单按钮弹出回收员列表 -->
<el-drawer title="收货员选择" :visible.sync="paidanDrawer" :direction="paidanDirection"
@ -201,18 +204,18 @@
<el-col style="margin-top:5px;">
<div v-if="item.autoEnabled=='开'" style="display:flex">
<div class="green"></div>
<span style="margin-left:10px;color:#8898AA;font-size:12px">{{`休息中`}}</span>
<span style="margin-left:10px;color:#8898AA;font-size:12px">开启接单</span>
</div>
<div v-else style="display:flex">
<div class="red"></div>
<span style="margin-left:10px;color:#8898AA;font-size:12px">{{`回收中`}}</span>
<span style="margin-left:10px;color:#8898AA;font-size:12px">关闭接单</span>
</div>
<!-- {{item.autoEnabled}} -->
</el-col>
</el-col>
<el-col :span="5">
<el-button type="primary" v-if="item.autoEnabled==''" plain
@click="chooseStaff(item.staffsName)">
@click="chooseStaff(item.id,item.staffsName)">
</el-button>
<el-button type="info" v-else>
@ -243,8 +246,8 @@ export default {
loading: false,
paidanDrawer: false,
paidanDirection: 'rtl',
staff: '',
staffList: [],
dataForm: {
id: '',
orderNumber: '',
@ -261,6 +264,7 @@ export default {
appointmentTimeEnd: '',
recycleStationId: "",
staffsId: "",
staffsName: '',
creatorUserId: '',
creatorTime: '',
consultTimeStart: '',
@ -274,13 +278,13 @@ export default {
attitudeStar: 0,
priceStar: 0,
isJiedan: false,
},
orderTypeIdProps: { "label": "fullName", "value": "id" },
orderClientStatusIdProps: { "label": "fullName", "value": "id" },
orderStafstatusIdProps: { "label": "fullName", "value": "id" },
recycleStationIdProps: { "label": "station_name", "value": "id" },
staffsIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
staffsIdProps: { "label": "fullName", "value": "id" },
staffsIdProps: { "label": "staffs_name", "value": "id" },
}
},
@ -336,11 +340,12 @@ export default {
})
},
chooseStaff(name) {
console.log(name);
chooseStaff(id, name) {
this.paidanDrawer = false
this.staff = name
console.log(this.staff);
this.dataForm.staffsId = id
this.dataForm.staffsName = name
// console.log(id);
// console.log(name);
},
getStaffList() {
this.paidanDrawer = true
@ -360,11 +365,33 @@ export default {
...o,
...this.expandObj,
}))
// console.log(this.staffList);
console.log(this.staffList[0].headIcon[0]);
console.log(this.staffList);
})
}
},
paidanConfirm() {
console.log('paidan confirm cliked');
// let _data = this.dataForm
// request({
// url: '/api/scm/RecycleOrder/' + this.dataForm.id,
// method: 'PUT',
// data: _data
// }).then((res) => {
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// onClose: () => {
// this.detailVisible = true
// this.$emit('refresh', true)
// }
// })
// }).catch(() => {
// // this.btnLoading = false
// // this.continueBtnLoading = false
// })
},
},
}
</script>
@ -400,4 +427,4 @@ export default {
border-radius: 50%;
background-color: red;
}
</style>
</style>

@ -161,6 +161,13 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="回收员姓名" prop="staffsName">
<JnpfInput v-model="dataForm.staffsName" @change="changeData('staffsName',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfDivider content="其他信息" contentPosition="center">
@ -339,6 +346,7 @@ export default {
appointmentTimeEnd: undefined,
recycleStationId: undefined,
staffsId: undefined,
staffsName: undefined,
creatorUserId: undefined,
creatorTime: undefined,
consultTimeStart: undefined,
@ -385,8 +393,8 @@ export default {
orderStafstatusIdProps: { "label": "fullName", "value": "id" },
recycleStationIdOptions: [],
recycleStationIdProps: { "label": "station_name", "value": "id" },
staffsIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
staffsIdProps: { "label": "fullName", "value": "id" },
staffsIdOptions: [],
staffsIdProps: { "label": "staffs_name", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
@ -404,6 +412,7 @@ export default {
appointmentTimeEnd: [],
recycleStationId: [],
staffsId: [],
staffsName: [],
creatorUserId: [],
creatorTime: [],
consultTimeStart: [],
@ -511,6 +520,7 @@ export default {
this.getorderClientStatusIdOptions();
this.getorderStafstatusIdOptions();
this.getrecycleStationIdOptions();
this.getstaffsIdOptions();
},
getorderTypeIdOptions() {
getDictionaryDataSelector('520193298627825989').then(res => {
@ -552,6 +562,31 @@ export default {
this.changeDataFormData(1, 'recycleStationId', 'recycleStationId', index, '')
})
},
getstaffsIdOptions() {
const index = this.childIndex
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.staffsId))
for (let i = 0; i < templateJsonList.length; i++) {
let json = templateJsonList[i];
if (json.relationField) {
let relationFieldAll = json.relationField.split("-");
let val = json.defaultValue;
if (relationFieldAll.length > 1 && index > -1) {
val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
} else {
val = this.dataForm[relationFieldAll]
}
json.defaultValue = val
}
}
let template = {
paramList: templateJsonList
}
getDataInterfaceRes('522739595385777413', template).then(res => {
let data = res.data
this.staffsIdOptions = data
this.changeDataFormData(1, 'staffsId', 'staffsId', index, '')
})
},
goBack() {
this.$emit('refresh')
},

@ -182,7 +182,6 @@
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
@ -270,8 +269,8 @@ export default {
orderStafstatusIdProps: { "label": "fullName", "value": "id" },
recycleStationIdOptions: [],
recycleStationIdProps: { "label": "station_name", "value": "id" },
staffsIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
staffsIdProps: { "label": "fullName", "value": "id" },
staffsIdOptions: [],
staffsIdProps: { "label": "staffs_name", "value": "id" },
interfaceRes: {
},
}
@ -292,6 +291,12 @@ export default {
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
goJiedanDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id, true)
})
},
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
@ -466,12 +471,6 @@ export default {
this.$refs.Detail.init(id)
})
},
goJiedanDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id, true)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop

Loading…
Cancel
Save