增加派单页面逻辑

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

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

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

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

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

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

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

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

@ -7,11 +7,12 @@
<el-page-header @back="goBack" :content="dataForm.isJiedan?'派单':'详情' " /> <el-page-header @back="goBack" :content="dataForm.isJiedan?'派单':'详情' " />
<div class="options"> <div class="options">
<el-button type="primary" v-if="dataForm.isJiedan==true" @click="getStaffList()"> <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> <span v-else></span>
</el-button> </el-button>
<el-button @click="goBack"> </el-button> <el-button @click="goBack"> </el-button>
<el-button @click="paidanConfirm"></el-button>
</div> </div>
</div> </div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}"> <el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
@ -98,7 +99,12 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收员" prop="staffsId"> <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> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
@ -177,11 +183,8 @@
</el-col> </el-col>
</template> </template>
</el-form> </el-form>
</el-row> </el-row>
</div> </div>
</transition> </transition>
<!-- 点击派单按钮弹出回收员列表 --> <!-- 点击派单按钮弹出回收员列表 -->
<el-drawer title="收货员选择" :visible.sync="paidanDrawer" :direction="paidanDirection" <el-drawer title="收货员选择" :visible.sync="paidanDrawer" :direction="paidanDirection"
@ -201,18 +204,18 @@
<el-col style="margin-top:5px;"> <el-col style="margin-top:5px;">
<div v-if="item.autoEnabled=='开'" style="display:flex"> <div v-if="item.autoEnabled=='开'" style="display:flex">
<div class="green"></div> <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>
<div v-else style="display:flex"> <div v-else style="display:flex">
<div class="red"></div> <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> </div>
<!-- {{item.autoEnabled}} --> <!-- {{item.autoEnabled}} -->
</el-col> </el-col>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-button type="primary" v-if="item.autoEnabled==''" plain <el-button type="primary" v-if="item.autoEnabled==''" plain
@click="chooseStaff(item.staffsName)"> @click="chooseStaff(item.id,item.staffsName)">
</el-button> </el-button>
<el-button type="info" v-else> <el-button type="info" v-else>
@ -243,8 +246,8 @@ export default {
loading: false, loading: false,
paidanDrawer: false, paidanDrawer: false,
paidanDirection: 'rtl', paidanDirection: 'rtl',
staff: '',
staffList: [], staffList: [],
dataForm: { dataForm: {
id: '', id: '',
orderNumber: '', orderNumber: '',
@ -261,6 +264,7 @@ export default {
appointmentTimeEnd: '', appointmentTimeEnd: '',
recycleStationId: "", recycleStationId: "",
staffsId: "", staffsId: "",
staffsName: '',
creatorUserId: '', creatorUserId: '',
creatorTime: '', creatorTime: '',
consultTimeStart: '', consultTimeStart: '',
@ -274,13 +278,13 @@ export default {
attitudeStar: 0, attitudeStar: 0,
priceStar: 0, priceStar: 0,
isJiedan: false, isJiedan: false,
}, },
orderTypeIdProps: { "label": "fullName", "value": "id" }, orderTypeIdProps: { "label": "fullName", "value": "id" },
orderClientStatusIdProps: { "label": "fullName", "value": "id" }, orderClientStatusIdProps: { "label": "fullName", "value": "id" },
orderStafstatusIdProps: { "label": "fullName", "value": "id" }, orderStafstatusIdProps: { "label": "fullName", "value": "id" },
recycleStationIdProps: { "label": "station_name", "value": "id" }, recycleStationIdProps: { "label": "station_name", "value": "id" },
staffsIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }], staffsIdProps: { "label": "staffs_name", "value": "id" },
staffsIdProps: { "label": "fullName", "value": "id" },
} }
}, },
@ -336,11 +340,12 @@ export default {
}) })
}, },
chooseStaff(name) { chooseStaff(id, name) {
console.log(name);
this.paidanDrawer = false this.paidanDrawer = false
this.staff = name this.dataForm.staffsId = id
console.log(this.staff); this.dataForm.staffsName = name
// console.log(id);
// console.log(name);
}, },
getStaffList() { getStaffList() {
this.paidanDrawer = true this.paidanDrawer = true
@ -360,11 +365,33 @@ export default {
...o, ...o,
...this.expandObj, ...this.expandObj,
})) }))
// console.log(this.staffList); console.log(this.staffList);
console.log(this.staffList[0].headIcon[0]);
}) })
} },
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> </script>
@ -400,4 +427,4 @@ export default {
border-radius: 50%; border-radius: 50%;
background-color: red; background-color: red;
} }
</style> </style>

@ -161,6 +161,13 @@
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </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"> <el-col :span="24">
<jnpf-form-tip-item> <jnpf-form-tip-item>
<JnpfDivider content="其他信息" contentPosition="center"> <JnpfDivider content="其他信息" contentPosition="center">
@ -339,6 +346,7 @@ export default {
appointmentTimeEnd: undefined, appointmentTimeEnd: undefined,
recycleStationId: undefined, recycleStationId: undefined,
staffsId: undefined, staffsId: undefined,
staffsName: undefined,
creatorUserId: undefined, creatorUserId: undefined,
creatorTime: undefined, creatorTime: undefined,
consultTimeStart: undefined, consultTimeStart: undefined,
@ -385,8 +393,8 @@ export default {
orderStafstatusIdProps: { "label": "fullName", "value": "id" }, orderStafstatusIdProps: { "label": "fullName", "value": "id" },
recycleStationIdOptions: [], recycleStationIdOptions: [],
recycleStationIdProps: { "label": "station_name", "value": "id" }, recycleStationIdProps: { "label": "station_name", "value": "id" },
staffsIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }], staffsIdOptions: [],
staffsIdProps: { "label": "fullName", "value": "id" }, staffsIdProps: { "label": "staffs_name", "value": "id" },
childIndex: -1, childIndex: -1,
isEdit: false, isEdit: false,
interfaceRes: { interfaceRes: {
@ -404,6 +412,7 @@ export default {
appointmentTimeEnd: [], appointmentTimeEnd: [],
recycleStationId: [], recycleStationId: [],
staffsId: [], staffsId: [],
staffsName: [],
creatorUserId: [], creatorUserId: [],
creatorTime: [], creatorTime: [],
consultTimeStart: [], consultTimeStart: [],
@ -511,6 +520,7 @@ export default {
this.getorderClientStatusIdOptions(); this.getorderClientStatusIdOptions();
this.getorderStafstatusIdOptions(); this.getorderStafstatusIdOptions();
this.getrecycleStationIdOptions(); this.getrecycleStationIdOptions();
this.getstaffsIdOptions();
}, },
getorderTypeIdOptions() { getorderTypeIdOptions() {
getDictionaryDataSelector('520193298627825989').then(res => { getDictionaryDataSelector('520193298627825989').then(res => {
@ -552,6 +562,31 @@ export default {
this.changeDataFormData(1, 'recycleStationId', 'recycleStationId', index, '') 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() { goBack() {
this.$emit('refresh') this.$emit('refresh')
}, },

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

Loading…
Cancel
Save