update

parent 93e885ce
...@@ -332,7 +332,6 @@ export type DetailUnit = { ...@@ -332,7 +332,6 @@ export type DetailUnit = {
contracts: Array<Contract>; contracts: Array<Contract>;
classification: Array<ClassificationOptions>; classification: Array<ClassificationOptions>;
taxCode: string; taxCode: string;
classificatonId: Array<ClassificationOptions>;
}; };
export type CustomerType = { export type CustomerType = {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<q-item style="padding-left: 10px; padding-right: 0px"> <q-item style="padding-left: 10px; padding-right: 0px">
<q-item-section <q-item-section
><q-item-label class="text-h6 text-weight-regular"> ><q-item-label class="text-h6 text-weight-regular">
Danh sách sản phẩm Danh sách sản phẩm 123
</q-item-label></q-item-section </q-item-label></q-item-section
> >
<q-item-section style="padding-right: 10px"> <q-item-section style="padding-right: 10px">
...@@ -139,7 +139,7 @@ export default defineComponent({ ...@@ -139,7 +139,7 @@ export default defineComponent({
(value) => { (value) => {
if (value) { if (value) {
selected.value = []; selected.value = [];
keyWord.value = ''; keyWord.value = null;
void listProductNotActive(); void listProductNotActive();
} }
} }
...@@ -201,7 +201,7 @@ export default defineComponent({ ...@@ -201,7 +201,7 @@ export default defineComponent({
const configImg = config; const configImg = config;
const keyWord = ref(''); const keyWord = ref(null);
const selected: Ref<listProductNotActives[]> = ref([]); const selected: Ref<listProductNotActives[]> = ref([]);
const getSelectedString = () => { const getSelectedString = () => {
return selected.value.length === 0 return selected.value.length === 0
...@@ -272,7 +272,7 @@ export default defineComponent({ ...@@ -272,7 +272,7 @@ export default defineComponent({
pageSize: pageSize.value, pageSize: pageSize.value,
name: '', name: '',
artistName: '', artistName: '',
keyWord: keyWord.value === '' ? '' : keyWord.value.trim(), keyWord: keyWord.value === null ? null : keyWord.value,
}, },
})) as AxiosResponse< })) as AxiosResponse<
BaseResponseBody< BaseResponseBody<
......
...@@ -9,11 +9,14 @@ ...@@ -9,11 +9,14 @@
<q-card-section class="q-pa-none"> <q-card-section class="q-pa-none">
<q-item> <q-item>
<q-item-section> <q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{ <q-item-label class="text-h6 text-weight-regular"
isUpdate >{{
? $t('managingUnit.dialogLabel.title.add') isUpdate
: $t('managingUnit.dialogLabel.title.update') ? $t('managingUnit.dialogLabel.title.add')
}}</q-item-label> : $t('managingUnit.dialogLabel.title.update')
}}
123
</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-card-section> </q-card-section>
...@@ -841,6 +844,7 @@ export default defineComponent({ ...@@ -841,6 +844,7 @@ export default defineComponent({
}; };
const addNewArtist = () => { const addNewArtist = () => {
console.log(artistField.value, 'artistField.value');
const newArtistList = [...props.artistList]; const newArtistList = [...props.artistList];
newArtistList.push({ newArtistList.push({
...@@ -853,6 +857,7 @@ export default defineComponent({ ...@@ -853,6 +857,7 @@ export default defineComponent({
artistFullName: artistName.value?.fullName, artistFullName: artistName.value?.fullName,
field: artistField.value?.name, field: artistField.value?.name,
fieldId: artistField.value?.id, fieldId: artistField.value?.id,
fieldNames: artistField.value?.name,
}); });
context.emit('update:artistList', [...newArtistList]); context.emit('update:artistList', [...newArtistList]);
console.log(newArtistList, 'newArtistList'); console.log(newArtistList, 'newArtistList');
......
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
<q-card-section class="q-pa-none"> <q-card-section class="q-pa-none">
<q-item> <q-item>
<q-item-section> <q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{ <q-item-label class="text-h6 text-weight-regular"
isUpdate >{{
? $t('managingUnitAdd.dialogLabel.title.add') isUpdate
: $t('managingUnitAdd.dialogLabel.title.update') ? $t('managingUnitAdd.dialogLabel.title.add')
}}</q-item-label> : $t('managingUnitAdd.dialogLabel.title.update')
}}
</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-card-section> </q-card-section>
...@@ -217,16 +219,26 @@ export default defineComponent({ ...@@ -217,16 +219,26 @@ export default defineComponent({
const artistListOptions: Ref<ArtistInfoType[]> = ref([]); const artistListOptions: Ref<ArtistInfoType[]> = ref([]);
const filteredOptions: Ref<ArtistInfoType[]> = ref([]); const filteredOptions: Ref<ArtistInfoType[]> = ref([]);
const fieldsAddOptions: Ref<FieldType[]> = ref([]); const fieldsAddOptions: Ref<FieldType[]> = ref([]);
watch(
() => props.isOpened,
(value) => {
if (value) {
void getFieldOptions();
}
}
);
watch( watch(
() => props.artistField, () => props.artistField,
(value) => { (value) => {
if (value) { if (value) {
isId.value = value.id; isId.value = value.id;
// void getFieldOptions();
void getArrayArtist(); void getArrayArtist();
} }
} }
); );
const getArrayArtist = async () => { const getArrayArtist = async () => {
artistListOptions.value = []; artistListOptions.value = [];
const response = (await api({ const response = (await api({
......
...@@ -476,7 +476,8 @@ export default defineComponent({ ...@@ -476,7 +476,8 @@ export default defineComponent({
unitStatus.value = response.data.data.status; unitStatus.value = response.data.data.status;
unitArtistList.value = response.data.data.contracts; unitArtistList.value = response.data.data.contracts;
unitField.value = response.data.data.classificatonId; unitField.value = response.data.data.classification;
unitUserName.value = response.data.data.userName; unitUserName.value = response.data.data.userName;
unitPassword.value = response.data.data.password; unitPassword.value = response.data.data.password;
} }
...@@ -599,7 +600,7 @@ export default defineComponent({ ...@@ -599,7 +600,7 @@ export default defineComponent({
email: unitEmail.value, email: unitEmail.value,
phoneNumber: unitPhoneNumber.value, phoneNumber: unitPhoneNumber.value,
status: unitStatus.value, status: unitStatus.value,
classification: unitField.value.length === 0 ? null : unitField.value, classification: unitField.value.length !== 0 ? null : unitField.value,
userName: unitUserName.value, userName: unitUserName.value,
password: unitPassword.value, password: unitPassword.value,
contracts: unitArtistList.value, contracts: unitArtistList.value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment