diff --git a/src/components/SelectBox/SelectBox.vue b/src/components/SelectBox/SelectBox.vue
index 76e9deda..fe2584ee 100644
--- a/src/components/SelectBox/SelectBox.vue
+++ b/src/components/SelectBox/SelectBox.vue
@@ -8,6 +8,7 @@
@blur="handleBlur"
@change="handleChange"
:clearable="props.clearable !== false"
+ :disabled="props.disabled === true"
>
{
for (let i = 0; i < _oldArr.length; i++) {
const value = _oldArr[i];
- if (item.prop !== value.prop) continue;
+ if (item.prop + item.label + item.type !== value.prop + value.label + value.type) continue;
_setArr.push(item);
_oldArr.splice(i, 1);
break;
@@ -170,7 +170,7 @@ const initTable = async () => {
_setArr.push(..._oldArr);
console.log('_setArr :>> ', _setArr);
- columnRef.value = _setArr;
+ columnRef.value = [..._setArr];
handleClearTableQuery(_setArr);
emit('update:modelValue', _setArr);
} catch (error) {
diff --git a/src/views/distribution/artery/addTripartiteTransfer.vue b/src/views/distribution/artery/addTripartiteTransfer.vue
index 60a18731..5c7ac63c 100644
--- a/src/views/distribution/artery/addTripartiteTransfer.vue
+++ b/src/views/distribution/artery/addTripartiteTransfer.vue
@@ -70,6 +70,16 @@
class="m-2"
placeholder="运费分摊方式"
size="default"
+ @change="
+ val => {
+ console.log('val :>> ', val);
+ if (val + '' === '2') return;
+ details.form.driverName = '';
+ details.form.driverId = '';
+ details.form.driverMobile = '';
+ details.form.carNumber = '';
+ }
+ "
>
-
+
-
-
+
-
+
handleChooseCar(val)"
>
- {{ val.goodsName }}
+ {{ val.carNumber }}
@@ -486,7 +519,14 @@ import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
-import { downloadXls, computeNumber, setNodeHeight, debounce, deepClone } from '@/utils/util';
+import {
+ downloadXls,
+ computeNumber,
+ setNodeHeight,
+ debounce,
+ deepClone,
+ getObjType,
+} from '@/utils/util';
import { columnList, newColumnList } from '@/option/distribution/addVehicleStowage';
import {
postloadFindLoadInitData,
@@ -495,7 +535,7 @@ import {
postFindCarrierByName,
postFindUseOrderList,
postSelectEditDetailByLoadId,
- postFindCarListByName
+ postFindCarListByName,
} from '@/api/distribution/AddVehicleStowage';
import {
postSaveNewTripartiteTransfer,
@@ -520,6 +560,9 @@ const ruleFormRef = ref();
const oldColumnListNode = ref();
const newColumnListNode = ref();
+// 选择车辆
+const carSelectRef = ref();
+
const details = reactive({
/** 是否开启搜索 */
search: true,
@@ -584,6 +627,14 @@ const details = reactive({
trigger: ['change'],
},
],
+ /** 送货方式 */
+ deliveryType: [
+ {
+ required: true,
+ message: '请选择送货方式',
+ trigger: ['change'],
+ },
+ ],
/** 客户类型 */
customerType: [
{
@@ -671,6 +722,8 @@ const details = reactive({
customerType: [],
/** 送货司机 */
driverListByName: [],
+ /** 车辆 */
+ carListByName: [],
/** 被选中在调度池的订单列表 */
orderCodeList: [],
/** 修改时, 已存在调度池中的运单数据 */
@@ -917,14 +970,19 @@ remoteMethodDriver('');
/** 查询车辆 */
const handleFindCar = async value => {
- const res = await postFindCarListByName({ carNumber: value });
+ const res = await postFindCarListByName({ carNumber: value });
const { code, data } = res.data;
if (code !== 200) return;
+ console.log('data :>> ', data);
details.carListByName = data;
};
/** 选择车辆 */
-const handleChooseCar = val => {};
+const handleChooseCar = val => {
+ details.form.carNumber = val.carNumber;
+ // 关闭下拉框
+ carSelectRef.value.handleClose();
+};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
@@ -1071,6 +1129,9 @@ const handleNameChange = () => {
form.value.driverName = _value.driverName;
form.value.driverId = _value.driverId;
form.value.driverMobile = _value.driverPhone;
+
+ if (getObjType(_value.carNumberList) !== 'array' || _value.carNumberList.length === 0) return;
+ form.value.carNumber = _value.carNumberList[0] || '';
};
/** 关闭页面 */
@@ -1378,4 +1439,13 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
.header_search > div {
width: 40%;
}
+
+.carRow {
+ padding: 8px 10px;
+ text-align: left;
+
+ &:hover {
+ background: #f5f7fa;
+ }
+}